Avoid selecting invalid tab when removing last page from wxOSX wxNotebook.
Closes #15897 (backport of r75663 from trunk). git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76319 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -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];
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user