gridsubdiv was not initialized properly
authorCampbell Barton <ideasman42@gmail.com>
Mon, 8 Oct 2007 17:37:04 +0000 (17:37 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Mon, 8 Oct 2007 17:37:04 +0000 (17:37 +0000)
source/blender/src/drawview.c
source/blender/src/space.c

index 2bcc7ed76a7c204f14dec88fdcf7809468c2ad76..d67df1e0e972a20e3652fd8321df37d88c70679f 100644 (file)
@@ -2443,7 +2443,7 @@ static void view3d_panel_properties(short cntrl)  // VIEW3D_HANDLER_SETTINGS
        uiBlockBeginAlign(block);
        uiDefButF(block, NUM, REDRAWVIEW3D, "Spacing:",         10, 200, 140, 19, &vd->grid, 0.001, 100.0, 10, 0, "Set the distance between grid lines");
        uiDefButS(block, NUM, REDRAWVIEW3D, "Lines:",           10, 180, 140, 19, &vd->gridlines, 0.0, 100.0, 100, 0, "Set the number of grid lines in perspective view");
-       uiDefButS(block, NUM, REDRAWVIEW3D, "Divisions:",               10, 160, 140, 19, &vd->gridsubdiv, 0.0, 100.0, 100, 0, "Set the number of grid lines");
+       uiDefButS(block, NUM, REDRAWVIEW3D, "Divisions:",               10, 160, 140, 19, &vd->gridsubdiv, 1.0, 100.0, 100, 0, "Set the number of grid lines");
        uiBlockEndAlign(block);
 
        uiDefBut(block, LABEL, 1, "3D Display:",                                                        160, 220, 150, 19, NULL, 0.0, 0.0, 0, 0, "");
index 6577421078deeba477104d70979fba5c3268539b..923a2ae010e7f2c378ee8d028c971b5be5739e9d 100644 (file)
@@ -2620,6 +2620,8 @@ static void initview3d(ScrArea *sa)
        vd->far= 500.0f;
        vd->grid= 1.0f;
        vd->gridlines= 16;
+       vd->gridsubdiv = 10;
+
        vd->lay= vd->layact= 1;
        if(G.scene) {
                vd->lay= vd->layact= G.scene->lay;