mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 13:06:59 -04:00
Minor updates that make things work!
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@945 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -163,11 +163,11 @@ void GalleryList::onChar(wxKeyEvent& ev) {
|
||||
} break;
|
||||
case WXK_RETURN: {
|
||||
// same thing: press dialog box default button
|
||||
wxButton* btn = wxDynamicCast(GetParent()->GetDefaultItem(), wxButton);
|
||||
if ( btn && btn->IsEnabled() ) {
|
||||
// if we do have a default button, do press it
|
||||
wxCommandEvent evt(wxEVT_COMMAND_BUTTON_CLICKED, btn->GetId());
|
||||
btn->ProcessEvent(evt);
|
||||
wxButton* btn = wxDynamicCast(wxDynamicCast(GetParent(), wxTopLevelWindow)->GetDefaultItem(), wxButton);
|
||||
if ( btn && btn->IsEnabled() ) {
|
||||
// if we do have a default button, do press it
|
||||
wxCommandEvent evt(wxEVT_COMMAND_BUTTON_CLICKED, btn->GetId());
|
||||
btn->ProcessEvent(evt);
|
||||
}
|
||||
}break;
|
||||
|
||||
|
||||
@@ -159,7 +159,8 @@ void ItemList::refreshList() {
|
||||
sort(sorted_list.begin(), sorted_list.end(), ItemComparer(*this));
|
||||
}
|
||||
// refresh
|
||||
RefreshItems(0, item_count - 1);
|
||||
if (item_count)
|
||||
RefreshItems(0, item_count - 1);
|
||||
if (item_count == 0) Refresh();
|
||||
// (re)select current item
|
||||
findSelectedItemPos();
|
||||
|
||||
Reference in New Issue
Block a user