From 9766084650014fcee76ba1dd87b48d6ee8c46123 Mon Sep 17 00:00:00 2001 From: Philippe Saint-Pierre Date: Thu, 9 Aug 2012 01:24:31 -0400 Subject: [PATCH] InfoWindow: Icon wasn't properly refreshing when changing --- src/kits/tracker/InfoWindow.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/kits/tracker/InfoWindow.cpp b/src/kits/tracker/InfoWindow.cpp index 7fd11debd1..11cc5d64de 100644 --- a/src/kits/tracker/InfoWindow.cpp +++ b/src/kits/tracker/InfoWindow.cpp @@ -1163,12 +1163,13 @@ AttributeView::ModelChanged(Model* model, BMessage* message) if (message->FindString("attr", &attrName) == B_OK) { if (strcmp(attrName, kAttrLargeIcon) == 0 || strcmp(attrName, kAttrIcon) == 0) { - Invalidate(BRect(10, 10, 10 + B_LARGE_ICON, 10 - + B_LARGE_ICON)); + IconCache::sIconCache->IconChanged(model->ResolveIfLink()); + Invalidate(); } else if (strcmp(attrName, kAttrMIMEType) == 0) { if (model->OpenNode() == B_OK) { + model->AttrChanged(attrName); InitStrings(model); model->CloseNode(); } @@ -1700,7 +1701,7 @@ AttributeView::MessageReceived(BMessage* message) void -AttributeView::Draw(BRect) +AttributeView::Draw(BRect updateRect) { // Set the low color for anti-aliasing SetLowColor(ui_color(B_PANEL_BACKGROUND_COLOR)); @@ -1719,7 +1720,7 @@ AttributeView::Draw(BRect) SetDrawingMode(B_OP_OVER); IconCache::sIconCache->Draw(fIconModel, this, fIconRect.LeftTop(), kNormalIcon, B_LARGE_ICON, true); - + SetDrawingMode(B_OP_COPY); // Font information font_height fontMetrics; BFont currentFont;