Block off potential errant double activation of tree project items
Additional fix for #6606
Cherrypick from 535dbc1a06
This commit is contained in:
parent
d7a6a2cc71
commit
be8fe7bdd6
|
@ -843,8 +843,12 @@ void TREE_PROJECT_FRAME::OnIdle( wxIdleEvent& aEvent )
|
|||
// This makes it ideal to launch a new window without starting Focus wars.
|
||||
if( m_selectedItem != nullptr )
|
||||
{
|
||||
m_selectedItem->Activate( this );
|
||||
m_selectedItem = nullptr;
|
||||
// Activate launches a window which may run the event loop on top of us
|
||||
// and cause OnIdle here to get called again, so be sure to block off the activation condition first
|
||||
PROJECT_TREE_ITEM* item = m_selectedItem;
|
||||
m_selectedItem = nullptr;
|
||||
|
||||
item->Activate( this );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue