Commit 7ed92370 authored by twanvl's avatar twanvl

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

parent 42ed8813
...@@ -109,14 +109,15 @@ void DropDownList::show(bool in_place, wxPoint pos, RealRect* rect) { ...@@ -109,14 +109,15 @@ void DropDownList::show(bool in_place, wxPoint pos, RealRect* rect) {
visible_start = 0; visible_start = 0;
ensureSelectedItemVisible(); ensureSelectedItemVisible();
// show // 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 if (selected_item == NO_SELECTION && itemCount() > 0) selected_item = 0; // select first item by default
mouse_down = false; mouse_down = false;
close_on_mouse_out = false; close_on_mouse_out = false;
Popup(); Popup();
if (isRoot() && GetParent()->HasCapture()) {
// release capture on parent
GetParent()->ReleaseMouse();
}
// fix drop down arrow // fix drop down arrow
redrawArrowOnParent(); redrawArrowOnParent();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment