Forráskód Böngészése

Bug fix: Wrong behaviour when trying to open a workspace that does not contain any valid session

Source commit: c05eb94464c26e4ff8648077ee174f63915b29d9
Martin Prikryl 2 éve
szülő
commit
942f951662
1 módosított fájl, 10 hozzáadás és 5 törlés
  1. 10 5
      source/forms/CustomScpExplorer.cpp

+ 10 - 5
source/forms/CustomScpExplorer.cpp

@@ -5290,13 +5290,18 @@ void TCustomScpExplorerForm::DoOpenFolderOrWorkspace(
   if (!CheckMaxSessions || (DataList->Count <= WinConfiguration->MaxSessions))
   {
     TManagedTerminal * FirstSession = Manager->NewSessions(DataList.get());
-    // FirstSession can be null, if some of the
-    if (!ConnectFirstTerminal && (FirstSession != NULL))
+    // FirstSession can be null, if none of the workspace sites exist anymore
+    // or if all workspace sessions are not suported by the interface
+    // (when trying to open all local-local workspace in "explorer" interface)
+    if (FirstSession != NULL)
     {
-      FirstSession->Disconnected = true;
-      FirstSession->DisconnectedTemporarily = true;
+      if (!ConnectFirstTerminal)
+      {
+        FirstSession->Disconnected = true;
+        FirstSession->DisconnectedTemporarily = true;
+      }
+      Manager->ActiveSession = FirstSession;
     }
-    Manager->ActiveSession = FirstSession;
   }
 }
 //---------------------------------------------------------------------------