Remove unneeded notifier data added in revision 26219.
[blender-staging.git] / source / blender / editors / space_outliner / space_outliner.c
index eb0e9dafbaa4c9b248f04b31660b5737b326446d..568c0b353e3941d9edb3c7783fc5bcb077ee07ae 100644 (file)
@@ -43,7 +43,7 @@
 #include "MEM_guardedalloc.h"
 
 #include "BLI_blenlib.h"
-#include "BLI_arithb.h"
+#include "BLI_math.h"
 #include "BLI_rand.h"
 
 #include "BKE_colortools.h"
@@ -77,7 +77,7 @@ static void outliner_main_area_init(wmWindowManager *wm, ARegion *ar)
        UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_LIST, ar->winx, ar->winy);
        
        /* own keymap */
-       keymap= WM_keymap_find(wm, "Outliner", SPACE_OUTLINER, 0);
+       keymap= WM_keymap_find(wm->defaultconf, "Outliner", SPACE_OUTLINER, 0);
        WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct);
 }
 
@@ -121,17 +121,24 @@ static void outliner_main_area_listener(ARegion *ar, wmNotifier *wmn)
                                case ND_KEYINGSET:
                                case ND_FRAME:
                                case ND_RENDER_OPTIONS:
+                               case ND_LAYER:
                                        ED_region_tag_redraw(ar);
                                        break;
                        }
                        break;
                case NC_OBJECT:
                        switch(wmn->data) {
+                               case ND_TRANSFORM:
+                                       /* transform doesn't change outliner data */
+                                       break;
                                case ND_BONE_ACTIVE:
                                case ND_BONE_SELECT:
-                               case ND_TRANSFORM:
                                        ED_region_tag_redraw(ar);
                                        break;
+                               case ND_MODIFIER:
+                                       if(wmn->action == NA_RENAME)
+                                               ED_region_tag_redraw(ar);
+                                       break;
                        }
                case NC_GROUP:
                        /* all actions now, todo: check outliner view mode? */
@@ -146,6 +153,10 @@ static void outliner_main_area_listener(ARegion *ar, wmNotifier *wmn)
                        if(wmn->data == ND_SPACE_OUTLINER)
                                ED_region_tag_redraw(ar);
                                break;
+               case NC_ID:
+                       if(wmn->action == NA_RENAME)
+                               ED_region_tag_redraw(ar);
+                       break;
        }
        
 }
@@ -153,38 +164,15 @@ static void outliner_main_area_listener(ARegion *ar, wmNotifier *wmn)
 
 /* ************************ header outliner area region *********************** */
 
-//#define PY_HEADER
-
 /* add handlers, stuff you only do once or on area/region changes */
 static void outliner_header_area_init(wmWindowManager *wm, ARegion *ar)
 {
-#ifdef PY_HEADER
        ED_region_header_init(ar);
-#else
-       UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_HEADER, ar->winx, ar->winy);
-#endif
 }
 
 static void outliner_header_area_draw(const bContext *C, ARegion *ar)
 {
-#ifdef PY_HEADER
        ED_region_header(C, ar);
-#else
-       float col[3];
-       
-       if(ED_screen_area_active(C))
-               UI_GetThemeColor3fv(TH_HEADER, col);
-       else
-               UI_GetThemeColor3fv(TH_HEADERDESEL, col);
-       
-       glClearColor(col[0], col[1], col[2], 0.0);
-       glClear(GL_COLOR_BUFFER_BIT);
-
-       /* set view2d view matrix for scrolling (without scrollers) */
-       UI_view2d_view_ortho(C, &ar->v2d);
-
-       outliner_header_buttons(C, ar);
-#endif
 }
 
 static void outliner_header_area_free(ARegion *ar)
@@ -299,7 +287,7 @@ void ED_spacetype_outliner(void)
        art= MEM_callocN(sizeof(ARegionType), "spacetype time region");
        art->regionid = RGN_TYPE_HEADER;
        art->minsizey= HEADERY;
-       art->keymapflag= ED_KEYMAP_UI|ED_KEYMAP_VIEW2D;
+       art->keymapflag= ED_KEYMAP_UI|ED_KEYMAP_VIEW2D|ED_KEYMAP_FRAMES|ED_KEYMAP_HEADER;
        
        art->init= outliner_header_area_init;
        art->draw= outliner_header_area_draw;