IMO, code in BrowseTracker plugin should be changed. OnIdle function will be called frequently resulting in flooding of such event.
Agreed
void BrowseTracker::OnIdle(wxIdleEvent& event)
// ----------------------------------------------------------------------------
{
event.Skip();
// Focus the new selected editor. This doesn't work if a long compile
// is active since there's no idle time. User will have to click into
// the editor window to activate it.
// This used to be done by the CB editor manager, but someone removed the UI hook.
if ((not Manager::Get()->IsAppShuttingDown()) && m_UpdateUIFocusEditor)
{
if (m_UpdateUIFocusEditor)
{
EditorBase* eb = m_UpdateUIFocusEditor;
if (not eb) return;
m_UpdateUIFocusEditor = 0;
Manager::Get()->GetEditorManager()->SetActiveEditor(eb);
eb->SetFocus();
#if defined(LOGGING)
LOGIT( _T("BT OnIdle Focused Editor[%p] Title[%s]"), eb, eb->GetTitle().c_str() );
#endif
// re-sort the browse marks
wxCommandEvent ev;
OnMenuSortBrowse_Marks(ev);
}
}
}
Note:
// This used to be done by the CB editor manager, but someone removed the UI hook.
To fix this issue and be able to still use BrowseTracker, you can add :
if(Manager::Get()->GetEditorManager()->GetActiveEditor() != eb)
before
Manager::Get()->GetEditorManager()->SetActiveEditor(eb);
in BrowseTracker's OnIdle.
It's maybe only a workaround and I think pecan should look into this code, whether it is still needed or not, so I do not commit it to trunk.