fix for missing break statements in switch, some key shortcuts and notifiers were...
authorCampbell Barton <ideasman42@gmail.com>
Sat, 13 Jul 2013 14:21:36 +0000 (14:21 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sat, 13 Jul 2013 14:21:36 +0000 (14:21 +0000)
source/blender/editors/interface/interface_handlers.c
source/blender/editors/sculpt_paint/paint_ops.c
source/blender/editors/space_time/space_time.c
source/blender/editors/space_view3d/view3d_ruler.c

index b3ad99c9690b83c2065e5db29279f0c3848af585..68cf07f695fb6a8d165cc11269461ab8d7174b87 100644 (file)
@@ -3721,7 +3721,7 @@ static bool ui_numedit_but_HSVCUBE(uiBut *but, uiHandleButtonData *data, int mx,
 
                        break;
                default:
-                       assert(!"invalid hsv type");
+                       BLI_assert(0);
        }
 
        hsv_to_rgb_v(hsv, rgb);
@@ -3791,6 +3791,7 @@ static void ui_ndofedit_but_HSVCUBE(uiBut *but, uiHandleButtonData *data, wmNDOF
                        hsv[2] += ndof->rx * sensitivity;
                        
                        CLAMP(hsv[2], but->softmin, but->softmax);
+                       break;
                default:
                        assert(!"invalid hsv type");
        }
index 6de6734f975e36cd7f3566f9f4948bddaaf54251..cef624463c25f84bed17408a2e3e3c9f7ee46846 100644 (file)
@@ -695,6 +695,7 @@ static int stencil_control_modal(bContext *C, wmOperator *op, const wmEvent *eve
                                WM_event_add_notifier(C, NC_WINDOW, NULL);
                                return OPERATOR_CANCELLED;
                        }
+                       break;
                case XKEY:
                        if (event->val == KM_PRESS) {
 
index 8258d7178894e0d0cb6ba0bc99bf80983a96873e..495980db4479e0d142c0d04aec9a894698dd3075 100644 (file)
@@ -403,6 +403,7 @@ static void time_listener(bScreen *UNUSED(sc), ScrArea *sa, wmNotifier *wmn)
        /* mainly for updating cache display */
        switch (wmn->category) {
                case NC_OBJECT:
+               {
                        switch (wmn->data) {
                                case ND_BONE_ACTIVE:
                                case ND_POINTCACHE:
@@ -414,7 +415,9 @@ static void time_listener(bScreen *UNUSED(sc), ScrArea *sa, wmNotifier *wmn)
                                        break;
                        }
                        break;
+               }
                case NC_SCENE:
+               {
                        switch (wmn->data) {
                                case ND_OB_ACTIVE:
                                case ND_FRAME:
@@ -435,18 +438,26 @@ static void time_listener(bScreen *UNUSED(sc), ScrArea *sa, wmNotifier *wmn)
                                }
                                break;
                        }
+                       break;
+               }
                case NC_SPACE:
+               {
                        switch (wmn->data) {
                                case ND_SPACE_CHANGED:
                                        ED_area_tag_refresh(sa);
                                        break;
                        }
+                       break;
+               }
                case NC_WM:
+               {
                        switch (wmn->data) {
                                case ND_FILEREAD:
                                        ED_area_tag_refresh(sa);
                                        break;
                        }
+                       break;
+               }
        }
 }
 
@@ -568,11 +579,13 @@ static void time_header_area_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa),
        /* context changes */
        switch (wmn->category) {
                case NC_SCREEN:
+               {
                        if (wmn->data == ND_ANIMPLAY)
                                ED_region_tag_redraw(ar);
                        break;
-
+               }
                case NC_SCENE:
+               {
                        switch (wmn->data) {
                                case ND_OB_SELECT:
                                case ND_FRAME:
@@ -582,11 +595,14 @@ static void time_header_area_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa),
                                        ED_region_tag_redraw(ar);
                                        break;
                        }
-
+                       break;
+               }
                case NC_SPACE:
+               {
                        if (wmn->data == ND_SPACE_TIME)
                                ED_region_tag_redraw(ar);
                        break;
+               }
        }
 }
 
index 576badf601ef8b046689070029d296eaab665f01..b2f2d5849a4d078c5e75be8c87aaeec29d9df55a 100644 (file)
@@ -967,6 +967,7 @@ static int view3d_ruler_modal(bContext *C, wmOperator *op, const wmEvent *event)
                                        WM_clipboard_text_set((void *) numstr, false);
                                }
                        }
+                       break;
                }
                case RIGHTCTRLKEY:
                case LEFTCTRLKEY: