diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-05-23 14:14:07 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-05-23 14:14:07 +0400 |
commit | 3d5ba20f6621a38fede413a5c49d4b7a6af7fad4 (patch) | |
tree | 1e9bc8ffeee94412cd529fb01d16bd15b3cfce4b /source/blender/windowmanager | |
parent | f5ec4cf4e914542ef3ebb27b49dcf42699f610a9 (diff) |
fix [#26618] StringProperty with sub_type of FILE_PATH not updated correctly from icon
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r-- | source/blender/windowmanager/WM_api.h | 2 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_operators.c | 13 |
2 files changed, 15 insertions, 0 deletions
diff --git a/source/blender/windowmanager/WM_api.h b/source/blender/windowmanager/WM_api.h index e08e681f494..3f9a3f636d0 100644 --- a/source/blender/windowmanager/WM_api.h +++ b/source/blender/windowmanager/WM_api.h @@ -247,6 +247,8 @@ void WM_operator_properties_gesture_border(struct wmOperatorType *ot, int exten void WM_operator_properties_gesture_straightline(struct wmOperatorType *ot, int cursor); void WM_operator_properties_select_all(struct wmOperatorType *ot); +wmOperator *WM_operator_last_redo(const struct bContext *C); + /* MOVE THIS SOMEWHERE ELSE */ #define SEL_TOGGLE 0 #define SEL_SELECT 1 diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c index 745ae0ae47e..fc2c0338bdf 100644 --- a/source/blender/windowmanager/intern/wm_operators.c +++ b/source/blender/windowmanager/intern/wm_operators.c @@ -882,6 +882,19 @@ int WM_operator_winactive(bContext *C) return 1; } +wmOperator *WM_operator_last_redo(const bContext *C) +{ + wmWindowManager *wm= CTX_wm_manager(C); + wmOperator *op; + + /* only for operators that are registered and did an undo push */ + for(op= wm->operators.last; op; op= op->prev) + if((op->type->flag & OPTYPE_REGISTER) && (op->type->flag & OPTYPE_UNDO)) + break; + + return op; +} + static uiBlock *wm_block_create_redo(bContext *C, ARegion *ar, void *arg_op) { wmOperator *op= arg_op; |