forked from mia/Aegisub
Correct custom labels for buttons with standard IDs
This commit is contained in:
parent
92887b53cf
commit
9eca8c5733
1 changed files with 8 additions and 8 deletions
|
@ -516,15 +516,15 @@ namespace Automation4 {
|
||||||
return button;
|
return button;
|
||||||
};
|
};
|
||||||
|
|
||||||
bool only_wxID_buttons = true;
|
if (boost::count(buttons | boost::adaptors::map_keys, -1) == 0) {
|
||||||
for (size_t i = 0; i < buttons.size(); ++i) {
|
for (size_t i = 0; i < buttons.size(); ++i)
|
||||||
bs->AddButton(make_button(buttons[i].first, i, buttons[i].second));
|
bs->AddButton(make_button(buttons[i].first, i, buttons[i].second));
|
||||||
if (buttons[i].first == -1)
|
|
||||||
only_wxID_buttons = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (only_wxID_buttons)
|
|
||||||
bs->Realize();
|
bs->Realize();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
for (size_t i = 0; i < buttons.size(); ++i)
|
||||||
|
bs->Add(make_button(buttons[i].first, i, buttons[i].second));
|
||||||
|
}
|
||||||
|
|
||||||
auto ms = new wxBoxSizer(wxVERTICAL);
|
auto ms = new wxBoxSizer(wxVERTICAL);
|
||||||
ms->Add(s, 0, wxBOTTOM, 5);
|
ms->Add(s, 0, wxBOTTOM, 5);
|
||||||
|
|
Loading…
Reference in a new issue