Code

axonometric grid: angles cannot be larger than 89 degrees.
authorjohanengelen <johanengelen@users.sourceforge.net>
Sat, 23 Sep 2006 19:33:30 +0000 (19:33 +0000)
committerjohanengelen <johanengelen@users.sourceforge.net>
Sat, 23 Sep 2006 19:33:30 +0000 (19:33 +0000)
src/display/canvas-axonomgrid.cpp

index 909ebdcdaf917d79607adeb53733e75d101f5846..c4fb41cecec89c4c350e8e68c16dd81cfb144052 100644 (file)
@@ -149,6 +149,7 @@ sp_caxonomgrid_set_arg (GtkObject *object, GtkArg *arg, guint arg_id)
     case ARG_ANGLEX:\r
         grid->angle_deg[X] = GTK_VALUE_DOUBLE (* arg);\r
         if (grid->angle_deg[X] < 0.0) grid->angle_deg[X] = 0.0;\r
+        if (grid->angle_deg[X] > 89.0) grid->angle_deg[X] = 89.0;\r
         grid->angle_rad[X] = deg_to_rad(grid->angle_deg[X]);\r
         grid->tan_angle[X] = tan(grid->angle_rad[X]);\r
         sp_canvas_item_request_update (item);\r
@@ -161,6 +162,7 @@ sp_caxonomgrid_set_arg (GtkObject *object, GtkArg *arg, guint arg_id)
     case ARG_ANGLEZ:\r
         grid->angle_deg[Z] = GTK_VALUE_DOUBLE (* arg);\r
         if (grid->angle_deg[Z] < 0.0) grid->angle_deg[Z] = 0.0;\r
+        if (grid->angle_deg[X] > 89.0) grid->angle_deg[X] = 89.0;\r
         grid->angle_rad[Z] = deg_to_rad(grid->angle_deg[Z]);\r
         grid->tan_angle[Z] = tan(grid->angle_rad[Z]);\r
         sp_canvas_item_request_update (item);\r