Minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20443 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -623,11 +623,9 @@ IconCache::GetWellKnownIcon(AutoLock<SimpleIconCache> *,
|
||||
{
|
||||
const WellKnowEntryList::WellKnownEntry *wellKnownEntry
|
||||
= WellKnowEntryList::MatchEntry(model->NodeRef());
|
||||
|
||||
if (!wellKnownEntry)
|
||||
return NULL;
|
||||
|
||||
|
||||
IconCacheEntry *entry = NULL;
|
||||
|
||||
BString type("tracker/active_");
|
||||
@@ -646,7 +644,6 @@ IconCache::GetWellKnownIcon(AutoLock<SimpleIconCache> *,
|
||||
}
|
||||
|
||||
if (!entry || !entry->HaveIconBitmap(NORMAL_ICON_ONLY, size)) {
|
||||
|
||||
// match up well known entries in the file system with specialized
|
||||
// icons stored in Tracker's resources
|
||||
int32 resid = -1;
|
||||
@@ -715,7 +712,6 @@ IconCache::GetWellKnownIcon(AutoLock<SimpleIconCache> *,
|
||||
BBitmap *bitmap = lazyBitmap->Get();
|
||||
GetTrackerResources()->GetIconResource(resid, size, bitmap);
|
||||
entry->SetIcon(lazyBitmap->Adopt(), kNormalIcon, size);
|
||||
|
||||
}
|
||||
|
||||
if (mode != kNormalIcon
|
||||
|
||||
@@ -6763,8 +6763,8 @@ BPoseView::DragSelectionRect(BPoint startPoint, bool shouldExtend)
|
||||
GetMouse(&newMousePoint, &button);
|
||||
|
||||
// draw initial empty selection rectangle
|
||||
BRect lastselectionRect;
|
||||
fSelectionRect = lastselectionRect = BRect(startPoint, startPoint - BPoint(1, 1));
|
||||
BRect lastSelectionRect;
|
||||
fSelectionRect = lastSelectionRect = BRect(startPoint, startPoint - BPoint(1, 1));
|
||||
|
||||
if (!fTransparentSelection) {
|
||||
SetDrawingMode(B_OP_INVERT);
|
||||
@@ -6813,19 +6813,23 @@ BPoseView::DragSelectionRect(BPoint startPoint, bool shouldExtend)
|
||||
BRegion updateRegion1;
|
||||
BRegion updateRegion2;
|
||||
|
||||
bool samewidth = fSelectionRect.Width() == lastselectionRect.Width();
|
||||
bool sameheight = fSelectionRect.Height() == lastselectionRect.Height();
|
||||
bool sameWidth = fSelectionRect.Width() == lastSelectionRect.Width();
|
||||
bool sameHeight = fSelectionRect.Height() == lastSelectionRect.Height();
|
||||
|
||||
updateRegion1.Include(fSelectionRect);
|
||||
updateRegion1.Exclude(lastselectionRect.InsetByCopy(samewidth ? 0 : 1, sameheight ? 0 : 1));
|
||||
updateRegion2.Include(lastselectionRect);
|
||||
updateRegion2.Exclude(fSelectionRect.InsetByCopy(samewidth ? 0 : 1, sameheight ? 0 : 1));
|
||||
updateRegion1.Exclude(lastSelectionRect.InsetByCopy(
|
||||
sameWidth ? 0 : 1, sameHeight ? 0 : 1));
|
||||
updateRegion2.Include(lastSelectionRect);
|
||||
updateRegion2.Exclude(fSelectionRect.InsetByCopy(
|
||||
sameWidth ? 0 : 1, sameHeight ? 0 : 1));
|
||||
updateRegion1.Include(&updateRegion2);
|
||||
BRect unionRect = fSelectionRect & lastselectionRect;
|
||||
updateRegion1.Exclude(unionRect & BRect(-2000, startPoint.y, 2000, startPoint.y));
|
||||
updateRegion1.Exclude(unionRect & BRect(startPoint.x, -2000, startPoint.x, 2000));
|
||||
BRect unionRect = fSelectionRect & lastSelectionRect;
|
||||
updateRegion1.Exclude(unionRect
|
||||
& BRect(-2000, startPoint.y, 2000, startPoint.y));
|
||||
updateRegion1.Exclude(unionRect
|
||||
& BRect(startPoint.x, -2000, startPoint.x, 2000));
|
||||
|
||||
lastselectionRect = fSelectionRect;
|
||||
lastSelectionRect = fSelectionRect;
|
||||
|
||||
Invalidate(&updateRegion1);
|
||||
Window()->UpdateIfNeeded();
|
||||
|
||||
Reference in New Issue
Block a user