Merge branch 'master' of github.com:buggins/dlangui

This commit is contained in:
Vadim Lopatin 2016-05-04 09:17:35 +03:00
commit 4e2addbcd0
1 changed files with 2 additions and 2 deletions

View File

@ -211,7 +211,7 @@ class MenuItem {
}
/// returns item label
@property UIString label() {
return _action.labelValue;
return _action !is null ? _action.labelValue : UIString("");
}
/// returns item action
@property const(Action) action() const { return _action; }
@ -372,7 +372,7 @@ class MenuItemWidget : WidgetGroupDefaultDrawing {
_item = item;
styleId = STYLE_MENU_ITEM;
updateState();
string iconId = _item.action.iconId;
string iconId = _item.action !is null ? _item.action.iconId : "";
if (_item.type == MenuItemType.Check)
iconId = "btn_check";
else if (_item.type == MenuItemType.Radio)