WM: use last_redo operator
authorCampbell Barton <ideasman42@gmail.com>
Mon, 23 Apr 2018 10:36:20 +0000 (12:36 +0200)
committerCampbell Barton <ideasman42@gmail.com>
Mon, 23 Apr 2018 10:36:20 +0000 (12:36 +0200)
Was showing operators that weren't meant to display in the UI.

release/scripts/startup/bl_ui/space_topbar.py

index 868c60b6a1aecdf9bd7ff756b0b5d86a8e3cfabd..d4d48735a670b0a96193baf6a587dd7da0f39cf1 100644 (file)
@@ -133,8 +133,7 @@ class TOPBAR_HT_lower_bar(Header):
 
         # Last Action (redo)
         layout.label("Last Action:")
-        operators = context.window_manager.operators
-        op = operators[-1] if operators else None
+        op = context.active_operator
         row = layout.row()
         row.enabled = op is not None
         row.popover(