Bugfix: Setting of new default settings for new Graph Editors was done
authorJoshua Leung <aligorith@gmail.com>
Thu, 4 Aug 2011 14:06:30 +0000 (14:06 +0000)
committerJoshua Leung <aligorith@gmail.com>
Thu, 4 Aug 2011 14:06:30 +0000 (14:06 +0000)
in wrong place, leading to loss of settings everytime the view changed
(i.e. after open/saving)

source/blender/editors/space_graph/space_graph.c

index fea9e5d71e8acb24cb7b2a59ad26ca93e0d354e0..3cc83b1212413b61fd4a51a16fa8a29563b7cdcd 100644 (file)
@@ -110,6 +110,10 @@ static SpaceLink *graph_new(const bContext *C)
        sipo->ads= MEM_callocN(sizeof(bDopeSheet), "GraphEdit DopeSheet");
        sipo->ads->source= (ID *)scene;
        
+       /* settings for making it easier by default to just see what you're interested in tweaking */
+       sipo->ads->filterflag |= ADS_FILTER_ONLYSEL;
+       sipo->flag |= SIPO_SELVHANDLESONLY;
+       
        /* header */
        ar= MEM_callocN(sizeof(ARegion), "header for graphedit");
        
@@ -187,10 +191,6 @@ static void graph_init(struct wmWindowManager *UNUSED(wm), ScrArea *sa)
                sipo->ads->source= (ID *)(G.main->scene.first); // FIXME: this is a really nasty hack here for now...
        }
        
-       /* settings for making it easier by default to just see what you're interested in tweaking */
-       sipo->ads->filterflag |= ADS_FILTER_ONLYSEL;
-       sipo->flag |= SIPO_SELVHANDLESONLY;
-
        ED_area_tag_refresh(sa);
 }