mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
fixed crash in drop down list when switching between editors
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@165 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -37,10 +37,8 @@ class DropDownHider : public wxEvtHandler {
|
|||||||
// don't just use ev.Skip(), because this event handler will be removed by hiding,
|
// don't just use ev.Skip(), because this event handler will be removed by hiding,
|
||||||
// so there will be no next handler to skip to
|
// so there will be no next handler to skip to
|
||||||
wxEvtHandler* nh = GetNextHandler();
|
wxEvtHandler* nh = GetNextHandler();
|
||||||
wxLogDebug(L"close to %p", nh);
|
|
||||||
list.hide(false);
|
list.hide(false);
|
||||||
if (nh) nh->ProcessEvent(ev);
|
if (nh) nh->ProcessEvent(ev);
|
||||||
wxLogDebug(L"/close to %p", nh);
|
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
// if (t !=10093 && t !=10098 && t !=10097 && t !=10099 && t !=10004 && t !=10062
|
// if (t !=10093 && t !=10098 && t !=10097 && t !=10099 && t !=10004 && t !=10062
|
||||||
@@ -80,6 +78,7 @@ DropDownList::DropDownList(Window* parent, bool is_submenu, ValueViewer* viewer)
|
|||||||
}
|
}
|
||||||
|
|
||||||
DropDownList::~DropDownList() {
|
DropDownList::~DropDownList() {
|
||||||
|
realHide(); // restore event handler before deleting it
|
||||||
delete hider;
|
delete hider;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ void ChoiceThumbnailRequest::store(const Image& img) {
|
|||||||
#ifdef __WXMSW__
|
#ifdef __WXMSW__
|
||||||
// for some reason windows doesn't like completely transparent images if they do not have a mask
|
// for some reason windows doesn't like completely transparent images if they do not have a mask
|
||||||
// HACK:
|
// HACK:
|
||||||
if (img.GetWidth() == 16 && img.GetHeight() == 16) {
|
if (img.HasAlpha() && img.GetWidth() == 16 && img.GetHeight() == 16) {
|
||||||
// is the image empty?
|
// is the image empty?
|
||||||
bool empty = true;
|
bool empty = true;
|
||||||
int* b = (int*)img.GetAlpha();
|
int* b = (int*)img.GetAlpha();
|
||||||
|
|||||||
Reference in New Issue
Block a user