Browse Source

Bug fix: It was possible to start renaming a site by double-clicking its node while editing the site

Source commit: 2c86af8b7eade0e7f2e1b00a11a508c0f8a4a3bc
Martin Prikryl 1 year ago
parent
commit
07ba2f60e0
1 changed files with 3 additions and 2 deletions
  1. 3 2
      source/forms/Login.cpp

+ 3 - 2
source/forms/Login.cpp

@@ -1957,8 +1957,9 @@ void __fastcall TLoginDialog::SessionTreeEditing(TObject * /*Sender*/,
 {
   DebugAssert(!FRenaming);
   AllowEdit =
-    IsFolderOrWorkspaceNode(Node) ||
-    (DebugAlwaysTrue(IsSiteNode(Node)) && !GetNodeSession(Node)->Special);
+    !FEditing &&
+    (IsFolderOrWorkspaceNode(Node) ||
+     (DebugAlwaysTrue(IsSiteNode(Node)) && !GetNodeSession(Node)->Special));
   FRenaming = AllowEdit;
   UpdateControls();
 }