mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-15 14:54:09 +02:00
Fixed crash saving new file
This commit is contained in:
parent
d375c805c9
commit
edcf92a451
1 changed files with 7 additions and 2 deletions
|
@ -1140,7 +1140,7 @@ namespace IDE
|
||||||
Dialog aDialog;
|
Dialog aDialog;
|
||||||
if (changedList.Count == 1)
|
if (changedList.Count == 1)
|
||||||
{
|
{
|
||||||
aDialog = ThemeFactory.mDefault.CreateDialog("Save file?", StackStringFormat!("{0} has been modified. Save before closing?", changedList[0]), DarkTheme.sDarkTheme.mIconWarning);
|
aDialog = ThemeFactory.mDefault.CreateDialog("Save file?", StackStringFormat!("Save changes to '{0}' before closing?", changedList[0]), DarkTheme.sDarkTheme.mIconWarning);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1209,6 +1209,8 @@ namespace IDE
|
||||||
{
|
{
|
||||||
var fileName = scope String();
|
var fileName = scope String();
|
||||||
Path.GetFileName(sourceViewPanel.mFilePath, fileName);
|
Path.GetFileName(sourceViewPanel.mFilePath, fileName);
|
||||||
|
if (fileName.IsWhiteSpace)
|
||||||
|
fileName.Set("untitled");
|
||||||
if (!changedList.Contains(fileName))
|
if (!changedList.Contains(fileName))
|
||||||
changedList.Add(new String(fileName));
|
changedList.Add(new String(fileName));
|
||||||
}
|
}
|
||||||
|
@ -1481,7 +1483,10 @@ namespace IDE
|
||||||
{
|
{
|
||||||
#if !CLI
|
#if !CLI
|
||||||
String fullDir = scope .();
|
String fullDir = scope .();
|
||||||
Path.GetDirectoryPath(sourceViewPanel.mFilePath, fullDir);
|
if (sourceViewPanel.mFilePath != null)
|
||||||
|
Path.GetDirectoryPath(sourceViewPanel.mFilePath, fullDir);
|
||||||
|
else if (!mWorkspace.mDir.IsWhiteSpace)
|
||||||
|
fullDir.Set(mWorkspace.mDir);
|
||||||
|
|
||||||
SaveFileDialog dialog = scope .();
|
SaveFileDialog dialog = scope .();
|
||||||
dialog.SetFilter("All files (*.*)|*.*");
|
dialog.SetFilter("All files (*.*)|*.*");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue