Fix updating selection in wxNotebook::InsertPage() in wxQt
Just use DoSetSelectionAfterInsertion() provided by the base class, which does the right thing already, including both setting m_selection and sending (or not sending) the corresponding events.
This commit is contained in:
@@ -154,12 +154,8 @@ bool wxNotebook::InsertPage(size_t n, wxWindow *page, const wxString& text,
|
|||||||
|
|
||||||
// reenable firing qt signals as internal wx initialization was completed
|
// reenable firing qt signals as internal wx initialization was completed
|
||||||
m_qtTabWidget->blockSignals(false);
|
m_qtTabWidget->blockSignals(false);
|
||||||
m_selection = m_qtTabWidget->currentIndex();
|
|
||||||
|
|
||||||
if (bSelect && GetPageCount() > 1)
|
DoSetSelectionAfterInsertion(n, bSelect);
|
||||||
{
|
|
||||||
SetSelection( n );
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user