mirror of https://github.com/buggins/dlangui.git
fix crash on popup dialogs w/o handlers
This commit is contained in:
parent
1554e52783
commit
7c39e9f15e
|
@ -162,7 +162,7 @@ class Dialog : VerticalLayout {
|
||||||
if (action) {
|
if (action) {
|
||||||
if (onDialogResult.assigned)
|
if (onDialogResult.assigned)
|
||||||
onDialogResult(this, action);
|
onDialogResult(this, action);
|
||||||
else if (_parentWindow)
|
else if (_parentWindow && !_popup)
|
||||||
_parentWindow.dispatchAction(action);
|
_parentWindow.dispatchAction(action);
|
||||||
}
|
}
|
||||||
if (_popup)
|
if (_popup)
|
||||||
|
|
|
@ -668,6 +668,12 @@ class TreeWidgetBase : ScrollWidget, OnTreeContentChangeListener, OnTreeStateCh
|
||||||
_needUpdateWidgets = false;
|
_needUpdateWidgets = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void clearAllItems() {
|
||||||
|
items.clear();
|
||||||
|
updateWidgets();
|
||||||
|
requestLayout();
|
||||||
|
}
|
||||||
|
|
||||||
protected void updateWidgetStates() {
|
protected void updateWidgetStates() {
|
||||||
for (int i = 0; i < _contentWidget.childCount; i++) {
|
for (int i = 0; i < _contentWidget.childCount; i++) {
|
||||||
TreeItemWidget child = cast(TreeItemWidget)_contentWidget.child(i);
|
TreeItemWidget child = cast(TreeItemWidget)_contentWidget.child(i);
|
||||||
|
|
Loading…
Reference in New Issue