Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Craddock <nzcraddock@gmail.com>2019-08-19 17:58:13 +0300
committerNathan Craddock <nzcraddock@gmail.com>2019-08-19 18:00:42 +0300
commit0b2e0877de97c79dfe0579f175f29c615a914140 (patch)
tree2620ef326f54b69b1e08d8d96586e7a6c8ea6d62 /source/blender/editors/space_outliner
parentc8e775180b3d3ad540b6d5f88e92162b7c93f098 (diff)
Outliner: sync selection on undo/redo
Tags all outliner sync types on undo and redo operations.
Diffstat (limited to 'source/blender/editors/space_outliner')
-rw-r--r--source/blender/editors/space_outliner/outliner_select.c5
-rw-r--r--source/blender/editors/space_outliner/outliner_sync.c6
2 files changed, 10 insertions, 1 deletions
diff --git a/source/blender/editors/space_outliner/outliner_select.c b/source/blender/editors/space_outliner/outliner_select.c
index 19fd4511e50..75219e6624f 100644
--- a/source/blender/editors/space_outliner/outliner_select.c
+++ b/source/blender/editors/space_outliner/outliner_select.c
@@ -1398,7 +1398,6 @@ static int outliner_item_do_activate_from_cursor(bContext *C,
else {
ED_region_tag_redraw_no_rebuild(ar);
}
- ED_undo_push(C, "Outliner selection change");
if (soops->flag & SO_SYNC_SELECT) {
ED_outliner_select_sync_from_outliner(C, soops);
@@ -1427,6 +1426,8 @@ void OUTLINER_OT_item_activate(wmOperatorType *ot)
ot->poll = ED_operator_outliner_active;
+ ot->flag |= OPTYPE_REGISTER | OPTYPE_UNDO;
+
PropertyRNA *prop;
RNA_def_boolean(ot->srna, "extend", true, "Extend", "Extend selection for activation");
prop = RNA_def_boolean(
@@ -1767,6 +1768,8 @@ void OUTLINER_OT_select_walk(wmOperatorType *ot)
ot->invoke = outliner_walk_select_invoke;
ot->poll = ED_operator_outliner_active;
+ ot->flag |= OPTYPE_REGISTER | OPTYPE_UNDO;
+
/* properties */
PropertyRNA *prop;
prop = RNA_def_enum(ot->srna,
diff --git a/source/blender/editors/space_outliner/outliner_sync.c b/source/blender/editors/space_outliner/outliner_sync.c
index a8aeb7ea4e1..cf734526958 100644
--- a/source/blender/editors/space_outliner/outliner_sync.c
+++ b/source/blender/editors/space_outliner/outliner_sync.c
@@ -75,6 +75,12 @@ void ED_outliner_select_sync_from_sequence_tag(bContext *C)
wm->outliner_sync_select_dirty |= WM_OUTLINER_SYNC_SELECT_FROM_SEQUENCE;
}
+void ED_outliner_select_sync_from_all_tag(bContext *C)
+{
+ wmWindowManager *wm = CTX_wm_manager(C);
+ wm->outliner_sync_select_dirty |= WM_OUTLINER_SYNC_SELECT_FROM_ALL;
+}
+
bool ED_outliner_select_sync_is_dirty(const bContext *C)
{
wmWindowManager *wm = CTX_wm_manager(C);