Developer forums (C::B DEVELOPMENT STRICTLY!) > CodeCompletion redesign
new CC branch built failed
Jenna:
--- Quote from: ollydbg on November 27, 2009, 04:48:47 pm ---
--- Quote from: Biplab on November 27, 2009, 04:42:30 pm ---IMO, code in BrowseTracker plugin should be changed. OnIdle function will be called frequently resulting in flooding of such event.
--- End quote ---
Agreed :D
--- Code: ---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);
}
}
}
--- End code ---
Note:
--- Quote ---// This used to be done by the CB editor manager, but someone removed the UI hook.
--- End quote ---
:D
--- End quote ---
To fix this issue and be able to still use BrowseTracker, you can add :
--- Code: ---if(Manager::Get()->GetEditorManager()->GetActiveEditor() != eb)
--- End code ---
before
--- Code: ---Manager::Get()->GetEditorManager()->SetActiveEditor(eb);
--- End code ---
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.
ollydbg:
--- Quote from: jens on November 27, 2009, 05:23:15 pm ---To fix this issue and be able to still use BrowseTracker, you can add :
--- Code: ---if(Manager::Get()->GetEditorManager()->GetActiveEditor() != eb)
--- End code ---
before
--- Code: ---Manager::Get()->GetEditorManager()->SetActiveEditor(eb);
--- End code ---
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.
--- End quote ---
Thanks jens!!! You are so smart!
Where is pecan? :D
Also, I just modify to this. (include " eb->SetFocus(); " to the if statement), also works.
--- Code: ---// ----------------------------------------------------------------------------
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;
if(Manager::Get()->GetEditorManager()->GetActiveEditor() != eb)
{
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);
}
}
}
--- End code ---
Pecan:
EDIT: BrowseTracker fixed svn 5944
Acknowledging this thread. I'll look into the situations.
thanks,
pecan
Navigation
[0] Message Index
[*] Previous page
Go to full version