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:
authorJulian Eisel <eiseljulian@gmail.com>2016-11-30 01:41:20 +0300
committerJulian Eisel <eiseljulian@gmail.com>2016-11-30 01:41:20 +0300
commit514db9f014110da442f13c5a84f9e895dabbf305 (patch)
treeb57bbe13b1204cd14dd269f48c380428da65e21c /source/blender/editors
parentbd5ae46c1968526058a98bfc99abbcbb3d7de69b (diff)
UI: Remove 'x' icon from paths and lists
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/interface/interface_utils.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/editors/interface/interface_utils.c b/source/blender/editors/interface/interface_utils.c
index f4df3d4ec2e..8dfbbdd02eb 100644
--- a/source/blender/editors/interface/interface_utils.c
+++ b/source/blender/editors/interface/interface_utils.c
@@ -119,7 +119,10 @@ uiBut *uiDefAutoButR(uiBlock *block, PointerRNA *ptr, PropertyRNA *prop, int ind
else
but = uiDefButR_prop(block, UI_BTYPE_TEXT, 0, name, x1, y1, x2, y2, ptr, prop, index, 0, 0, -1, -1, NULL);
- UI_but_flag_enable(but, UI_BUT_VALUE_CLEAR); /* might want to make this optional? */
+ PropertySubType subtype = RNA_property_subtype(prop);
+ if (!(ELEM(subtype, PROP_FILEPATH, PROP_DIRPATH, PROP_FILENAME) || (block->flag & UI_BLOCK_LIST_ITEM))) {
+ UI_but_flag_enable(but, UI_BUT_VALUE_CLEAR);
+ }
if (RNA_property_flag(prop) & PROP_TEXTEDIT_UPDATE) {
UI_but_flag_enable(but, UI_BUT_TEXTEDIT_UPDATE);
}