X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a855f8ccca0495498afaaa11f0e8d80ee20c3be2..69659fd770f615210efac4b4fa741b3ad6223616:/src/common/dbgrid.cpp diff --git a/src/common/dbgrid.cpp b/src/common/dbgrid.cpp index d8b13172a3..634be020d8 100644 --- a/src/common/dbgrid.cpp +++ b/src/common/dbgrid.cpp @@ -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;