mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-12 05:36:59 -04:00
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:
@@ -136,7 +136,7 @@ void DropDownList::show(bool in_place, wxPoint pos, RealRect* rect) {
|
|||||||
item_size.width = virtual_size.width - marginW * 2;
|
item_size.width = virtual_size.width - marginW * 2;
|
||||||
// is there enough room for all items, or do we need a scrollbar?
|
// 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 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) {
|
if (size.height > max_height) {
|
||||||
size.height = max_height;
|
size.height = max_height;
|
||||||
size.width += wxSystemSettings::GetMetric(wxSYS_VSCROLL_ARROW_X); // width of scrollbar
|
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
|
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;
|
||||||
Window::Show();
|
wxPopupWindow::Show();
|
||||||
if (isRoot() && GetParent()->HasCapture()) {
|
if (isRoot() && GetParent()->HasCapture()) {
|
||||||
// release capture on parent
|
// release capture on parent
|
||||||
GetParent()->ReleaseMouse();
|
GetParent()->ReleaseMouse();
|
||||||
|
|||||||
Reference in New Issue
Block a user