]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/dbgrid.cpp
Compile fix
[wxWidgets.git] / src / common / dbgrid.cpp
index 418d445b16005590ac8477e544f75e4c75493114..634be020d86bc7e42dddf0a28f3732e90493a27e 100644 (file)
@@ -203,11 +203,12 @@ bool wxDbGridTableBase::AssignDbTable(wxDbTable *tab, int count, bool takeOwners
 {
     wxDbGridCellAttrProvider *provider;
 
+    wxGridUpdateLocker locker(GetView());
+
     //Remove Information from grid about old data
     if (GetView())
     {
         wxGrid *grid = GetView();
-        grid->BeginBatch();
         grid->ClearSelection();
         if (grid->IsCellEditControlEnabled())
         {
@@ -250,7 +251,6 @@ bool wxDbGridTableBase::AssignDbTable(wxDbTable *tab, int count, bool takeOwners
         wxGrid * grid = GetView();
         wxGridTableMessage msg(this, wxGRIDTABLE_NOTIFY_ROWS_APPENDED, m_rowtotal);
         grid->ProcessTableMessage(msg);
-        grid->EndBatch();
     }
     m_dbowner = takeOwnership;
     m_rowmodified = false;
@@ -646,7 +646,8 @@ void wxDbGridTableBase::SetValueAsBool(int row, int col, bool value)
 
 void wxDbGridTableBase::ValidateRow(int row)
 {
-    wxLogDebug(wxT("ValidateRow(%i) currently on row (%i). Array count = %i"),row,m_row,m_keys.GetCount());
+    wxLogDebug(wxT("ValidateRow(%i) currently on row (%i). Array count = %lu"),
+               row, m_row, (unsigned long)m_keys.GetCount());
 
     if (row == m_row)
          return;