attempt to deal with mouse capture in DropDownList, still not entirely correct!

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1557 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2010-12-07 21:45:27 +00:00
parent 961e4c3cd9
commit 61e686649b
+5 -4
View File
@@ -109,14 +109,15 @@ void DropDownList::show(bool in_place, wxPoint pos, RealRect* rect) {
visible_start = 0;
ensureSelectedItemVisible();
// show
if (GetParent()->HasCapture()) {
// release capture on parent
// do this before showing the popup, because that might change who has the capture
GetParent()->ReleaseMouse();
}
if (selected_item == NO_SELECTION && itemCount() > 0) selected_item = 0; // select first item by default
mouse_down = false;
close_on_mouse_out = false;
Popup();
if (isRoot() && GetParent()->HasCapture()) {
// release capture on parent
GetParent()->ReleaseMouse();
}
// fix drop down arrow
redrawArrowOnParent();
}