X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/670f9935630beb2123a5ca62894ae92a3f0efa4f..1c1ad00573fc825322af8e5174c52a10a17385c9:/src/common/dbgrid.cpp diff --git a/src/common/dbgrid.cpp b/src/common/dbgrid.cpp index 418d445b16..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; @@ -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;