Avoid selecting invalid tab when removing last page from wxOSX wxNotebook.

Closes #15897.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75663 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2014-01-21 18:39:03 +00:00
parent e3c7cd18d6
commit 82a774cf98

View File

@ -194,7 +194,8 @@ public:
// avoid 'changed' events when setting the tab programmatically
wxTabViewController* controller = [slf delegate];
[slf setDelegate:nil];
[slf selectTabViewItemAtIndex:(value-1)];
if ( value > 0 )
[slf selectTabViewItemAtIndex:(value-1)];
[slf setDelegate:controller];
}