Page MenuHome

Adjust Last Operation: Other changes outside that panel are reverted back automatically
Confirmed, NormalPublicDESIGN

Description

System Information
Operating system: Windows-7-6.1.7601-SP1 64 Bits
Graphics card: GeForce GTX 660 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 445.87

Blender Version
Broken: version: 2.90.0 Alpha, branch: master, commit date: 2020-06-22 22:06, hash: rB51bf04383aa0
Worked: (newest version of Blender that worked as expected)

Short description of error
Here the demo and file

Exact steps for others to reproduce the error

  1. Add some objects, add last one
  2. Change visibility for other objects via outliner
  3. Change property in adjustment popup
  4. Scene settings resetted to previous

Event Timeline

Vyacheslav (hitrpr) renamed this task from Scene state reset during changing property for new object to Scene`s state resets during changing property for new object.Jun 23 2020, 9:35 PM
Philipp Oeser (lichtwerk) changed the task status from Needs Triage to Confirmed.Jun 24 2020, 11:40 AM
Philipp Oeser (lichtwerk) changed the subtype of this task from "Report" to "Design".

I think this is a general issue with Redo/Adjust Last Operation (but this could very well be a design limitation atm):

A similar issue also came up in T73302, see, my reply there T73302#856078

The Adjust Last Operation panel stays as long as you dont execute another operator. Change visibility for other objects via outliner [or basically any setting in the property editor] is not an operator (if it was another operator, the panel would close), so this panel stays open. Doing adjustments in this panel then will hop back in the undo stack, so changes done to settings after the operator execution get wiped again.
Not sure if this can easily be done, but I would propose to just close the Adjust Last Operation panel upon unrelated [non-operator] property changes, which should get rid of this confusion.

I assume this is not a bug, but maybe something the User Interface team can comment upon [or close if this is not considered to be changed anytime soon]?
Will update the tilte to reflect my findings.

CC @Julian Eisel (Severin)
CC @Campbell Barton (campbellbarton)
CC @William Reynish (billreynish)

Philipp Oeser (lichtwerk) renamed this task from Scene`s state resets during changing property for new object to Operator Redo/Adjust Last Operation: panel stays open, changes to unrelated properties (done after operator execution) will get undone when changing properties in the panel again.Jun 24 2020, 11:40 AM

This is indeed a design limitation/issue, not a bug.

We *could* clear the undo registry when doing the undo push for a button, removing the panel:

diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c
index 3f3f0513184..305bcd1eb0f 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -946,6 +946,7 @@ static void ui_apply_but_funcs_after(bContext *C)
     ui_afterfunc_update_preferences_dirty(&after);
 
     if (after.undostr[0]) {
+      WM_operator_stack_clear(CTX_wm_manager(C));
       ED_undo_push(C, after.undostr);
     }
   }
diff --git a/source/blender/editors/interface/interface_region_hud.c b/source/blender/editors/interface/interface_region_hud.c
index 1f8af7b9e6e..c02047fef94 100644
--- a/source/blender/editors/interface/interface_region_hud.c
+++ b/source/blender/editors/interface/interface_region_hud.c
@@ -231,11 +231,27 @@ static void hud_region_draw(const bContext *C, ARegion *region)
   }
 }
 
+static void hud_region_listener(wmWindow *UNUSED(win),
+                                ScrArea *UNUSED(area),
+                                ARegion *region,
+                                wmNotifier *wmn,
+                                const Scene *UNUSED(scene))
+{
+  switch (wmn->category) {
+    case NC_WM:
+      if (wmn->data == ND_HISTORY) {
+        ED_region_tag_redraw(region);
+      }
+      break;
+  }
+}
+
 ARegionType *ED_area_type_hud(int space_type)
 {
   ARegionType *art = MEM_callocN(sizeof(ARegionType), __func__);
   art->regionid = RGN_TYPE_HUD;
   art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_VIEW2D;
+  art->listener = hud_region_listener;
   art->layout = hud_region_layout;
   art->draw = hud_region_draw;
   art->init = hud_region_init;

This is quite a design change though, not sure if it's a good idea.

Julian Eisel (Severin) renamed this task from Operator Redo/Adjust Last Operation: panel stays open, changes to unrelated properties (done after operator execution) will get undone when changing properties in the panel again to Adjust Last Operation: Changes in Outliner are reverted back automatically.Jun 26 2020, 6:48 PM
Philipp Oeser (lichtwerk) renamed this task from Adjust Last Operation: Changes in Outliner are reverted back automatically to Adjust Last Operation: Other changes outside that panel are reverted back automatically.Sep 11 2020, 6:21 PM