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/editors | |
parent | f5ec4cf4e914542ef3ebb27b49dcf42699f610a9 (diff) |
fix [#26618] StringProperty with sub_type of FILE_PATH not updated correctly from icon
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/space_buttons/buttons_ops.c | 13 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/view3d_toolbar.c | 17 |
2 files changed, 15 insertions, 15 deletions
diff --git a/source/blender/editors/space_buttons/buttons_ops.c b/source/blender/editors/space_buttons/buttons_ops.c index 9190d5aff54..9b914df1b3c 100644 --- a/source/blender/editors/space_buttons/buttons_ops.c +++ b/source/blender/editors/space_buttons/buttons_ops.c @@ -51,6 +51,7 @@ #include "WM_types.h" #include "ED_screen.h" +#include "ED_util.h" #include "RNA_access.h" @@ -131,7 +132,19 @@ static int file_browse_exec(bContext *C, wmOperator *op) RNA_property_update(C, &fbo->ptr, fbo->prop); MEM_freeN(str); + + /* special, annoying exception, filesel on redo panel [#26618] */ + { + wmOperator *redo_op= WM_operator_last_redo(C); + if(redo_op) { + if(fbo->ptr.data == redo_op->ptr->data) { + ED_undo_operator_repeat(C, redo_op); + } + } + } + MEM_freeN(op->customdata); + return OPERATOR_FINISHED; } diff --git a/source/blender/editors/space_view3d/view3d_toolbar.c b/source/blender/editors/space_view3d/view3d_toolbar.c index 7fad19f16a6..2e96800bf3b 100644 --- a/source/blender/editors/space_view3d/view3d_toolbar.c +++ b/source/blender/editors/space_view3d/view3d_toolbar.c @@ -69,19 +69,6 @@ /* ******************* view3d space & buttons ************** */ -static wmOperator *view3d_last_operator(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 void view3d_panel_operator_redo_buts(const bContext *C, Panel *pa, wmOperator *op) { uiLayoutOperatorButs(C, pa->layout, op, NULL, 'V', 0); @@ -89,7 +76,7 @@ static void view3d_panel_operator_redo_buts(const bContext *C, Panel *pa, wmOper static void view3d_panel_operator_redo_header(const bContext *C, Panel *pa) { - wmOperator *op= view3d_last_operator(C); + wmOperator *op= WM_operator_last_redo(C); if(op) BLI_strncpy(pa->drawname, op->type->name, sizeof(pa->drawname)); else BLI_strncpy(pa->drawname, "Operator", sizeof(pa->drawname)); @@ -110,7 +97,7 @@ static void view3d_panel_operator_redo_operator(const bContext *C, Panel *pa, wm static void view3d_panel_operator_redo(const bContext *C, Panel *pa) { - wmOperator *op= view3d_last_operator(C); + wmOperator *op= WM_operator_last_redo(C); uiBlock *block; if(op==NULL) |