• Nikolai Kosjar's avatar
    CppEditor: Fix jump behavior in outline sidebar · db358f9e
    Nikolai Kosjar authored
    
    
    Before, we jumped to a symbol as soon as the selection changed, which
    was problematic:
     * It was inconsistent to other outlines (e.g. class view, project
       explorer)
     * Using the Up/Down keys in the sidebar immediately jumped to the
       symbol in the editor, thus polluting the editor history.
    
    Now we jump to a symbol if the corresponding item was explicitly
    activated (QAbstractItemView::activated() signal).
    
    There was also another strange issue: If "Synchronize with Editor" was
    de-activated, nothing happened upon activation/selection of an item. Now
    "Synchronize with Editor" means to update the selection in the side bar
    if the cursor position changes in the editor (one direction only).
    
    Task-number: QTCREATORBUG-12412
    Change-Id: I8d9191d5fa8e229723194dcf30081e144debecbb
    Reviewed-by: default avatarEike Ziller <eike.ziller@digia.com>
    Reviewed-by: default avatarErik Verbruggen <erik.verbruggen@digia.com>
    db358f9e
cppoutline.cpp 6.13 KB