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:
Vadim Zeitlin
2018-05-13 02:10:34 +02:00
parent a57c192023
commit dca84c823c

View File

@@ -1973,8 +1973,11 @@ bool wxAuiNotebook::InsertPage(size_t page_idx,
else
active_tabctrl->InsertPage(page, info, page_idx);
UpdateTabCtrlHeight();
DoSizing();
// Note that we don't need to call DoSizing() if the height has changed, as
// it's already called from UpdateTabCtrlHeight() itself in this case.
if ( !UpdateTabCtrlHeight() )
DoSizing();
active_tabctrl->DoShowHide();
// adjust selected index