* Fix #6548. Don't initially Hide() if already hidden, otherwise the showlevel

would never get a chance be visible again.

When instanciated from an archive, a BDragger restores its
BView::fShowLevel and thus can already be hidden if archived while hidden.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42137 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Alexandre Deckner
2011-06-13 00:12:43 +00:00
parent e53a1e0f94
commit 94af9087b0
+4 -4
View File
@@ -319,9 +319,9 @@ BDragger::MessageReceived(BMessage *msg)
fTransition = false; fTransition = false;
} else { } else {
if ((fShelf && (fShelf->AllowsDragging() && AreDraggersDrawn())) if ((fShelf && (fShelf->AllowsDragging() && AreDraggersDrawn()))
|| AreDraggersDrawn()) || AreDraggersDrawn()) {
Show(); Show();
else } else
Hide(); Hide();
} }
break; break;
@@ -629,7 +629,7 @@ BDragger::_InitData()
{ {
fBitmap = new BBitmap(BRect(0.0f, 0.0f, 7.0f, 7.0f), B_CMAP8, false, false); fBitmap = new BBitmap(BRect(0.0f, 0.0f, 7.0f, 7.0f), B_CMAP8, false, false);
fBitmap->SetBits(kHandBitmap, fBitmap->BitsLength(), 0, B_CMAP8); fBitmap->SetBits(kHandBitmap, fBitmap->BitsLength(), 0, B_CMAP8);
// we need to translate some strings, and in order to do so, we need // we need to translate some strings, and in order to do so, we need
// to use the LocaleBackend to reach liblocale.so // to use the LocaleBackend to reach liblocale.so
if (gLocaleBackend == NULL) if (gLocaleBackend == NULL)
@@ -652,7 +652,7 @@ BDragger::_AddToList()
// The dragger is not shown - but we can't hide us in case we're the // The dragger is not shown - but we can't hide us in case we're the
// parent of the actual target view (because then you couldn't see // parent of the actual target view (because then you couldn't see
// it anymore). // it anymore).
if (fRelation != TARGET_IS_CHILD) if (fRelation != TARGET_IS_CHILD && !IsHidden())
Hide(); Hide();
} }
} }