mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-09 03:52:19 +02:00
Null check in PathEditWidget
This commit is contained in:
parent
454ed279dc
commit
e4d350a3d5
2 changed files with 4 additions and 1 deletions
|
@ -188,6 +188,9 @@ namespace IDE.ui
|
||||||
else
|
else
|
||||||
mDirBase = new String();
|
mDirBase = new String();
|
||||||
mDirectoryEdit = new PathEditWidget(.Folder);
|
mDirectoryEdit = new PathEditWidget(.Folder);
|
||||||
|
if (gApp.mWorkspace.mDir != null)
|
||||||
|
mDirectoryEdit.mDefaultFolderPath = new .(gApp.mWorkspace.mDir);
|
||||||
|
|
||||||
AddEdit(mDirectoryEdit);
|
AddEdit(mDirectoryEdit);
|
||||||
mDirectoryEdit.mOnContentChanged.Add(new (dlg) =>
|
mDirectoryEdit.mOnContentChanged.Add(new (dlg) =>
|
||||||
{
|
{
|
||||||
|
|
|
@ -75,7 +75,7 @@ namespace IDE.ui
|
||||||
String path = scope .();
|
String path = scope .();
|
||||||
GetText(path);
|
GetText(path);
|
||||||
|
|
||||||
if (path.IsWhiteSpace)
|
if ((path.IsWhiteSpace) && (mDefaultFolderPath != null))
|
||||||
path.Set(mDefaultFolderPath);
|
path.Set(mDefaultFolderPath);
|
||||||
#if !CLI
|
#if !CLI
|
||||||
FolderBrowserDialog folderDialog = scope .();
|
FolderBrowserDialog folderDialog = scope .();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue