]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/dbgrid.cpp
Rework the wxCusor ctor taking wx stock number to provide as many cursors as
[wxWidgets.git] / src / common / dbgrid.cpp
index d8b13172a32ee901937d026df42ef5706f91d04b..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;