Build rectanglular blines in the same handedness as all the other shapes.
[synfig.git] / synfig-studio / trunk / src / gtkmm / state_rectangle.cpp
index c1fcc59..a6c3ddf 100644 (file)
@@ -6,6 +6,7 @@
 **
 **     \legal
 **     Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
+**  Copyright (c) 2008 Chris Moore
 **
 **     This package is free software; you can redistribute it and/or
 **     modify it under the terms of the GNU General Public License as
@@ -489,8 +490,8 @@ StateRectangle_Context::make_rectangle(const Point& _p1, const Point& _p2)
        {
                new_list.push_back(*(new BLinePoint));
                new_list[i].set_width(1);
-               new_list[i].set_vertex(Point((i==0||i==1)?x_min:x_max,
-                                                                        (i==0||i==3)?y_min:y_max));
+               new_list[i].set_vertex(Point((i==0||i==3)?x_min:x_max,
+                                                                        (i==0||i==1)?y_min:y_max));
                new_list[i].set_tangent(Point(0,0));
        }
 
@@ -829,6 +830,7 @@ StateRectangle_Context::event_mouse_click_handler(const Smach::event& x)
 
        if(event.key==EVENT_WORKAREA_MOUSE_BUTTON_DRAG && event.button==BUTTON_LEFT)
        {
+               if (!point2_duck) return Smach::RESULT_OK;
                point2_duck->set_point(get_work_area()->snap_point_to_grid(event.pos));
                get_work_area()->queue_draw();
                return Smach::RESULT_ACCEPT;