]> git.saurik.com Git - wxWidgets.git/commitdiff
restore the original selection when the dropdown is cancelled even if it was -1;...
authorVadim Zeitlin <vadim@wxwidgets.org>
Wed, 24 Sep 2008 13:33:06 +0000 (13:33 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Wed, 24 Sep 2008 13:33:06 +0000 (13:33 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55831 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/choice.cpp

index 7b73e6f6f1d0106c0ce347d08d08db42fcba6c0e..14a10703bc375d8139cfa45e4dc3fee57265f0d7 100644 (file)
@@ -703,13 +703,6 @@ bool wxChoice::MSWCommand(WXUINT param, WXWORD WXUNUSED(id))
             // need to reset the selection back to it if it's eventually
             // cancelled by user
             m_lastAcceptedSelection = GetCurrentSelection();
-            if ( m_lastAcceptedSelection == -1 )
-            {
-                // no current selection so no need to restore it later (this
-                // happens when opening a combobox containing text not from its
-                // list of items and we shouldn't erase this text)
-                m_lastAcceptedSelection = wxID_NONE;
-            }
             break;
 
         case CBN_CLOSEUP: