Patch #23460: Fix for Outliner; excludes expand button from renaming an object
authorJoshua Leung <aligorith@gmail.com>
Mon, 23 Aug 2010 11:03:48 +0000 (11:03 +0000)
committerJoshua Leung <aligorith@gmail.com>
Mon, 23 Aug 2010 11:03:48 +0000 (11:03 +0000)
Submitted by: Alexander Kuznetsov (alexk)

Ctrl-LMB or Double-Click over the expand buttons in the Outliner would try renaming the object/item, but in 2.4x this only happened over the name.

source/blender/editors/space_outliner/outliner.c

index 3865fd213b474a789e07a862c758fc798a6eb2c1..16021e0f909043b2eb042221b330738c1b865377 100644 (file)
@@ -2402,7 +2402,7 @@ static int do_outliner_item_activate(bContext *C, Scene *scene, ARegion *ar, Spa
                        return 1;
                }
                /* name and first icon */
-               else if(mval[0]>te->xs && mval[0]<te->xend) {
+               else if(mval[0]>te->xs+OL_X && mval[0]<te->xend) {
                        
                        /* always makes active object */
                        if(tselem->type!=TSE_SEQUENCE && tselem->type!=TSE_SEQ_STRIP && tselem->type!=TSE_SEQUENCE_DUP)
@@ -2599,7 +2599,7 @@ static int do_outliner_item_rename(bContext *C, ARegion *ar, SpaceOops *soops, T
                TreeStoreElem *tselem= TREESTORE(te);
                
                /* name and first icon */
-               if(mval[0]>te->xs && mval[0]<te->xend) {
+               if(mval[0]>te->xs+OL_X && mval[0]<te->xend) {
                        
                        /* can't rename rna datablocks entries */
                        if(ELEM3(tselem->type, TSE_RNA_STRUCT, TSE_RNA_PROPERTY, TSE_RNA_ARRAY_ELEM))