Ensure the wxBusyInfo box displays a message when loading the GQB.
authordpage <dpage@a7884b65-44f6-0310-8a51-81a127f17b15>
Mon, 23 Mar 2009 12:28:00 +0000 (12:28 +0000)
committerdpage <dpage@a7884b65-44f6-0310-8a51-81a127f17b15>
Mon, 23 Mar 2009 12:28:00 +0000 (12:28 +0000)
git-svn-id: svn://svn.pgadmin.org/trunk/pgadmin3@7745 a7884b65-44f6-0310-8a51-81a127f17b15

pgadmin/frm/frmQuery.cpp

index b141a5a00415c5bbbfeb63f30f96d96405ccbb2d..0614f8abd560774ef0e7fe5355324aa1a7e937ad 100644 (file)
@@ -480,11 +480,6 @@ pgsTimer(new pgScriptTimer(this))
 
     msgResult->SetMaxLength(0L);
     msgHistory->SetMaxLength(0L);
-
-    // TODO 666 : This should be replaced with a message when activating GQB not at startup
-    wxString msg=wxT("Loading Database metadata info for Graphical Query Builder");
-    wxBusyInfo waiting(msg, this);
-
 }
 
 
@@ -874,6 +869,12 @@ void frmQuery::OnChangeConnection(wxCommandEvent &ev)
         {
             wxString msg = _("Retrieving tables from database ") + wxString(conn->GetDbname());
             wxBusyInfo waiting(msg, this);
+
+            // Give the UI a chance to redraw
+            wxSafeYield();
+            wxMilliSleep(100);
+            wxSafeYield();
+
             controller->getTablesBrowser()->refreshTables(conn);
             controller->getView()->Refresh();
         }
@@ -1016,6 +1017,12 @@ void frmQuery::OnChangeNotebook(wxNotebookEvent& event)
                 // Create a server object and connect it.
                 wxString msg= _("Retrieving tables from database ") + wxString(conn->GetDbname());
                 wxBusyInfo waiting(msg, this);
+
+                // Give the UI a chance to redraw
+                wxSafeYield();
+                wxMilliSleep(100);
+                wxSafeYield();
+
                 controller->getTablesBrowser()->refreshTables(conn);
                 firstTime=false;
             }