Optimize away an unnecessary extra wxAuiNotebook::DoSizing() call
There is no need to call DoSizing() again if it has just been called from UpdateTabCtrlHeight().
This commit is contained in:
@@ -1973,8 +1973,11 @@ bool wxAuiNotebook::InsertPage(size_t page_idx,
|
|||||||
else
|
else
|
||||||
active_tabctrl->InsertPage(page, info, page_idx);
|
active_tabctrl->InsertPage(page, info, page_idx);
|
||||||
|
|
||||||
UpdateTabCtrlHeight();
|
// Note that we don't need to call DoSizing() if the height has changed, as
|
||||||
DoSizing();
|
// it's already called from UpdateTabCtrlHeight() itself in this case.
|
||||||
|
if ( !UpdateTabCtrlHeight() )
|
||||||
|
DoSizing();
|
||||||
|
|
||||||
active_tabctrl->DoShowHide();
|
active_tabctrl->DoShowHide();
|
||||||
|
|
||||||
// adjust selected index
|
// adjust selected index
|
||||||
|
Reference in New Issue
Block a user