Web pgadmin.org
 Home 
 ·  ·  ·  ·  ·  ·  · 
CVS Commit by andreas: fix server menu after failed connect

CVS Commit by andreas: fix server menu after failed connect



Log Message:
-----------
fix server menu after failed connect

Modified Files:
--------------
    pgadmin3/src/ui:
        frmMain.cpp (r1.113 -> r1.114)

Index: frmMain.cpp
===================================================================
RCS file: /projects/pgadmin3/src/ui/frmMain.cpp,v
retrieving revision 1.113
retrieving revision 1.114
diff -Lsrc/ui/frmMain.cpp -Lsrc/ui/frmMain.cpp -u -w -r1.113 -r1.114
--- src/ui/frmMain.cpp
+++ src/ui/frmMain.cpp
@@ -703,6 +703,7 @@
     switch (res)
     {
         case PGCONN_OK:
+        {
             StartMsg(_("Restoring previous environment"));
             wxLogInfo(wxT("pgServer object initialised as required."));
             browser->SetItemImage(server->GetId(), PGICON_SERVER, wxTreeItemIcon_Normal);
@@ -722,7 +723,8 @@
                 browser->EnsureVisible(item);
             }
             EndMsg();
-            break;
+            return res;
+        }
         case PGCONN_DNSERR:
             /*
             // looks strange to me. Shouldn_t server be removed from the tree as well?
@@ -737,6 +739,8 @@
             wxLogInfo(wxT("pgServer object didn't initialise because the user aborted."));
             break;
     }
+
+    server->Disconnect();
     return res;
 }
 


Home | Main Index | Thread Index

top