Account for first removal char with wxELLIPSIZE_MIDDLE.
authorVáclav Slavík <vslavik@fastmail.fm>
Mon, 31 Jan 2011 18:23:32 +0000 (18:23 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Mon, 31 Jan 2011 18:23:32 +0000 (18:23 +0000)
commit4d3de2c5f73181b71296a10de17b96d63b78268a
tree4584b15560b6042d15488e130affea5ee982075f
parent3433de6e63a163ef8d37bc8aee84635b71868004
Account for first removal char with wxELLIPSIZE_MIDDLE.

wxControl::Ellipsize() in wxELLIPSIZE_MIDDLE mode starts the
string-shortening loop with the removal interval initially set to remove
only the len/2-th character. But it didn't add its size to the running
total of removal characters' length, thus always removing one more
character. Fixed by making the initial interval 0-sized rather than
1-sized.

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