]> git.saurik.com Git - wxWidgets.git/commit
Correct test for maximal row index in generic wxDataViewCtrl.
authorVadim Zeitlin <vadim@wxwidgets.org>
Thu, 21 Jul 2011 13:50:10 +0000 (13:50 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Thu, 21 Jul 2011 13:50:10 +0000 (13:50 +0000)
commit4385e702963373bf015f5a9dbad95c9b9c2e0809
tree797fcaf72e038d74744192c61cc5022bc0f33200
parent26647ae4a7f4982c18a1af8bbfe0910a97b78620
Correct test for maximal row index in generic wxDataViewCtrl.

The comparison in EVT_CHAR handler was incorrect for an empty control without
any rows as it subtracting 1 from 0 resulted in UINT_MAX and not -1 as all the
values were unsigned.

Fix this by checking that the new row is valid instead, this is correct for
both signed and unsigned values.

Closes #13356.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68320 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
src/generic/datavgen.cpp