fixed DropDownList in wx2.8: should use wxPopupWindow::Show instead of wxWindow::Show

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1581 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2011-01-06 12:51:55 +00:00
parent bcaef7eb30
commit 3a33b07f4e
+2 -2
View File
@@ -136,7 +136,7 @@ void DropDownList::show(bool in_place, wxPoint pos, RealRect* rect) {
item_size.width = virtual_size.width - marginW * 2;
// is there enough room for all items, or do we need a scrollbar?
int room_below = wxGetDisplaySize().y - border_size.height - pos.y - parent_height - 50;
int max_height = max(200, room_below);
int max_height = max(300, room_below);
if (size.height > max_height) {
size.height = max_height;
size.width += wxSystemSettings::GetMetric(wxSYS_VSCROLL_ARROW_X); // width of scrollbar
@@ -160,7 +160,7 @@ void DropDownList::show(bool in_place, wxPoint pos, RealRect* rect) {
if (selected_item == NO_SELECTION && itemCount() > 0) selected_item = 0; // select first item by default
mouse_down = false;
close_on_mouse_out = false;
Window::Show();
wxPopupWindow::Show();
if (isRoot() && GetParent()->HasCapture()) {
// release capture on parent
GetParent()->ReleaseMouse();