diff options
author | Nikolai Kosjar <nikolai.kosjar@digia.com> | 2014-06-25 17:06:55 -0400 |
---|---|---|
committer | Erik Verbruggen <erik.verbruggen@digia.com> | 2014-06-27 11:26:43 +0200 |
commit | db358f9ebcdc3751346d63acbf0f4a11140dac92 (patch) | |
tree | 9429701d82f1f85bf5713d07167e428814434f93 /src/plugins/cppeditor/cppoutline.h | |
parent | 87fa7b77dd39e1860a798ff936f1994f63c5f91d (diff) |
CppEditor: Fix jump behavior in outline sidebar
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: Eike Ziller <eike.ziller@digia.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Diffstat (limited to 'src/plugins/cppeditor/cppoutline.h')
-rw-r--r-- | src/plugins/cppeditor/cppoutline.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/plugins/cppeditor/cppoutline.h b/src/plugins/cppeditor/cppoutline.h index 12ca590c14..291f0a59cb 100644 --- a/src/plugins/cppeditor/cppoutline.h +++ b/src/plugins/cppeditor/cppoutline.h @@ -77,9 +77,8 @@ public: private slots: void modelUpdated(); void updateSelectionInTree(const QModelIndex &index); - void updateSelectionInText(const QItemSelection &selection); void updateTextCursor(const QModelIndex &index); - void focusEditor(); + void onItemActivated(const QModelIndex &index); private: bool syncCursor(); |