mirror of https://github.com/adamdruppe/arsd.git
fix layout bugs if you remove widget
This commit is contained in:
parent
3863f03866
commit
de8a5798ec
|
@ -1135,6 +1135,8 @@ class Widget : ReflectableProperties {
|
||||||
|
|
||||||
this.parent.widgetRemoved(idx, this);
|
this.parent.widgetRemoved(idx, this);
|
||||||
//this.parent = null;
|
//this.parent = null;
|
||||||
|
|
||||||
|
p.queueRecomputeChildLayout();
|
||||||
}
|
}
|
||||||
version(win32_widgets) {
|
version(win32_widgets) {
|
||||||
removeAllChildren();
|
removeAllChildren();
|
||||||
|
@ -1174,6 +1176,8 @@ class Widget : ReflectableProperties {
|
||||||
this._children = null;
|
this._children = null;
|
||||||
foreach(idx, w; orig)
|
foreach(idx, w; orig)
|
||||||
this.widgetRemoved(idx, w);
|
this.widgetRemoved(idx, w);
|
||||||
|
|
||||||
|
queueRecomputeChildLayout();
|
||||||
}
|
}
|
||||||
|
|
||||||
/++
|
/++
|
||||||
|
@ -14587,11 +14591,12 @@ class FilePicker : Dialog {
|
||||||
|
|
||||||
} else version(Posix) {
|
} else version(Posix) {
|
||||||
import core.sys.posix.dirent;
|
import core.sys.posix.dirent;
|
||||||
|
import core.stdc.errno;
|
||||||
auto dir = opendir((cwd ~ "\0").ptr);
|
auto dir = opendir((cwd ~ "\0").ptr);
|
||||||
scope(exit)
|
scope(exit)
|
||||||
if(dir) closedir(dir);
|
if(dir) closedir(dir);
|
||||||
if(dir is null)
|
if(dir is null)
|
||||||
throw new ErrnoApiException("opendir [" ~ cwd ~ "]");
|
throw new ErrnoApiException("opendir [" ~ cwd ~ "]", errno);
|
||||||
|
|
||||||
auto dirent = readdir(dir);
|
auto dirent = readdir(dir);
|
||||||
if(dirent is null)
|
if(dirent is null)
|
||||||
|
|
Loading…
Reference in New Issue