From a1c888437d0b8cd617806fd4f9a290c1a69d79df Mon Sep 17 00:00:00 2001 From: Artur Wieczorek Date: Sun, 14 Jun 2015 17:10:28 +0200 Subject: [PATCH] Use dedicated IncBy method to increase wxSize value in propgrid sample. Use this method instead of modifying directly wxSize data members. --- samples/propgrid/propgrid.cpp | 3 +-- samples/propgrid/tests.cpp | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/samples/propgrid/propgrid.cpp b/samples/propgrid/propgrid.cpp index 3449f98c83..c76a07df30 100644 --- a/samples/propgrid/propgrid.cpp +++ b/samples/propgrid/propgrid.cpp @@ -2472,8 +2472,7 @@ void FormMain::OnFitColumnsClick( wxCommandEvent& WXUNUSED(event) ) int dx = oldFullSize.x - oldGridSize.x; int dy = oldFullSize.y - oldGridSize.y; - newSz.x += dx; - newSz.y += dy; + newSz.IncBy(dx, dy); SetSize(newSz); } diff --git a/samples/propgrid/tests.cpp b/samples/propgrid/tests.cpp index 1d36106966..a5807dbd04 100644 --- a/samples/propgrid/tests.cpp +++ b/samples/propgrid/tests.cpp @@ -1211,8 +1211,7 @@ bool FormMain::RunTests( bool fullTest, bool interactive ) wxSize sz = GetSize(); wxSize origSz = sz; - sz.x += 5; - sz.y += 5; + sz.IncBy(5, 5); if ( pgman->GetGrid()->GetSplitterPosition() != trySplitterPos ) RT_FAILURE_MSG(wxString::Format(wxT("Splitter position was %i (should have been %i)"),(int)pgman->GetGrid()->GetSplitterPosition(),trySplitterPos).c_str());