]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/choice_osx.cpp
fix memory leak while testing for correct Clone() implementation (closes #10304)
[wxWidgets.git] / src / osx / choice_osx.cpp
index 1481b1419cf06f34c5524fb2345895295116e2e7..4bc08e371bfb81f05d3bf851384f33b1093f12b7 100644 (file)
@@ -169,7 +169,7 @@ void wxChoice::DoClear()
 // ----------------------------------------------------------------------------
 int wxChoice::GetSelection() const
 {
-    return m_peer->GetValue() ;
+    return m_peer->GetValue() -1;
 }
 
 void wxChoice::SetSelection( int n )
@@ -241,7 +241,7 @@ bool wxChoice::HandleClicked( double timestampsec )
         event.SetInt( n );
         event.SetString( GetStringSelection() );
         event.SetEventObject( this );
-
+        
         if ( HasClientObjectData() )
             event.SetClientObject( GetClientObject( n ) );
         else if ( HasClientUntypedData() )