open new file on create
This commit is contained in:
@@ -73,12 +73,13 @@ public partial class NewCsharpFileDialog : ConfirmationDialog
|
||||
|
||||
_ = Task.GodotRun(async () =>
|
||||
{
|
||||
await _ideFileOperationsService.CreateCsFile(ParentNode, fileName);
|
||||
var sharpIdeFile = await _ideFileOperationsService.CreateCsFile(ParentNode, fileName);
|
||||
GodotGlobalEvents.Instance.FileExternallySelected.InvokeParallelFireAndForget(sharpIdeFile, null);
|
||||
});
|
||||
QueueFree();
|
||||
}
|
||||
|
||||
private bool IsNameInvalid(string name)
|
||||
private static bool IsNameInvalid(string name)
|
||||
{
|
||||
return string.IsNullOrWhiteSpace(name);
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ public partial class SolutionExplorerPanel
|
||||
}
|
||||
else if (actionId is FileContextMenuOptions.Delete)
|
||||
{
|
||||
var confirmedTcs = new TaskCompletionSource<bool>();
|
||||
var confirmedTcs = new TaskCompletionSource<bool>(TaskCreationOptions.RunContinuationsAsynchronously);
|
||||
var confirmationDialog = new ConfirmationDialog();
|
||||
confirmationDialog.Title = "Delete";
|
||||
confirmationDialog.DialogText = $"Delete '{file.Name}' file?";
|
||||
|
||||
@@ -45,7 +45,7 @@ public partial class SolutionExplorerPanel
|
||||
}
|
||||
else if (actionId is FolderContextMenuOptions.Delete)
|
||||
{
|
||||
var confirmedTcs = new TaskCompletionSource<bool>();
|
||||
var confirmedTcs = new TaskCompletionSource<bool>(TaskCreationOptions.RunContinuationsAsynchronously);
|
||||
var confirmationDialog = new ConfirmationDialog();
|
||||
confirmationDialog.Title = "Delete";
|
||||
confirmationDialog.DialogText = $"Delete '{folder.Name}' file?";
|
||||
|
||||
Reference in New Issue
Block a user