mirror of https://github.com/buggins/dlangui.git
possible fix for #231
This commit is contained in:
parent
8b28219174
commit
0e3a2b8c51
|
@ -174,9 +174,11 @@ class Window : CustomEventTarget {
|
|||
@property uint keyboardModifiers() const { return _keyboardModifiers; }
|
||||
@property Widget mainWidget() { return _mainWidget; }
|
||||
@property void mainWidget(Widget widget) {
|
||||
if (_mainWidget !is null)
|
||||
if (_mainWidget !is null) {
|
||||
_mainWidget.window = null;
|
||||
_mainWidget = widget;
|
||||
destroy(_mainWidget);
|
||||
}
|
||||
_mainWidget = widget;
|
||||
if (_mainWidget !is null)
|
||||
_mainWidget.window = this;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue