forked from mia/Aegisub
Fix infinite loop of error messages when an invalid command is displayed in the hotkey editor
This commit is contained in:
parent
1d69efc35e
commit
5298634721
1 changed files with 8 additions and 3 deletions
|
@ -91,10 +91,15 @@ public:
|
|||
if (col == 0)
|
||||
variant = to_wx(combo.Str());
|
||||
else if (col == 1) {
|
||||
auto icon_bmp = cmd::get(combo.CmdName())->Icon(16);
|
||||
wxIcon icon;
|
||||
if (icon_bmp.IsOk())
|
||||
icon.CopyFromBitmap(icon_bmp);
|
||||
try {
|
||||
auto icon_bmp = cmd::get(combo.CmdName())->Icon(16);
|
||||
if (icon_bmp.IsOk())
|
||||
icon.CopyFromBitmap(icon_bmp);
|
||||
}
|
||||
catch (agi::Exception const& e) {
|
||||
// Just use no icon; error is reported in the description column
|
||||
}
|
||||
variant << wxDataViewIconText(to_wx(combo.CmdName()), icon);
|
||||
}
|
||||
else if (col == 2) {
|
||||
|
|
Loading…
Reference in a new issue