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:
authorCampbell Barton <ideasman42@gmail.com>2013-10-09 18:35:25 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-10-09 18:35:25 +0400
commitde3f6b3ec19d2402be8003e172c69e87c356f310 (patch)
treeaff68463f10941cd54d531317eaf1b321c7ab72f /source/blender/editors/interface/interface_layout.c
parent49bc31067163474729755c8a9dbd543ba3744d3f (diff)
re-enable activating the text input field for new popup dialog boxes,
I'd disabled this for 2.68 since it caused bug [#36109]. This fix now only enabled text activation for popups. (so the toolbar textboxes are skipped)
Diffstat (limited to 'source/blender/editors/interface/interface_layout.c')
-rw-r--r--source/blender/editors/interface/interface_layout.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c
index 424d2231a03..4e498476f5d 100644
--- a/source/blender/editors/interface/interface_layout.c
+++ b/source/blender/editors/interface/interface_layout.c
@@ -3091,20 +3091,25 @@ void uiLayoutOperatorButs(const bContext *C, uiLayout *layout, wmOperator *op,
/* set various special settings for buttons */
{
+ uiBlock *block = uiLayoutGetBlock(layout);
+ const bool is_popup = (block->flag & UI_BLOCK_KEEP_OPEN) != 0;
uiBut *but;
+
- for (but = uiLayoutGetBlock(layout)->buttons.first; but; but = but->next) {
+ for (but = block->buttons.first; but; but = but->next) {
/* no undo for buttons for operator redo panels */
uiButClearFlag(but, UI_BUT_UNDO);
-#if 0 /* broken, causes freedback loop, see [#36109] */
+ /* only for popups, see [#36109] */
+
/* if button is operator's default property, and a text-field, enable focus for it
* - this is used for allowing operators with popups to rename stuff with fewer clicks
*/
- if ((but->rnaprop == op->type->prop) && (but->type == TEX)) {
- uiButSetFocusOnEnter(CTX_wm_window(C), but);
+ if (is_popup) {
+ if ((but->rnaprop == op->type->prop) && (but->type == TEX)) {
+ uiButSetFocusOnEnter(CTX_wm_window(C), but);
+ }
}
-#endif
}
}
}