Set the canvas of the bline used by the circle tool.
authordooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Sun, 6 Apr 2008 19:27:12 +0000 (19:27 +0000)
committerdooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Sun, 6 Apr 2008 19:27:12 +0000 (19:27 +0000)
git-svn-id: http://svn.voria.com/code@1968 1f10aa63-cdf2-0310-b900-c93c546f37ac

synfig-studio/trunk/src/gtkmm/state_circle.cpp

index 733567b..3a1d4ac 100644 (file)
@@ -514,7 +514,7 @@ StateCircle_Context::make_circle(const Point& _p1, const Point& _p2)
 
        Layer::Handle layer;
 
-       Canvas::Handle canvas(get_canvas_view()->get_canvas());
+       Canvas::Handle canvas;
        int depth(0);
 
        // we are temporarily using the layer to hold something
@@ -560,6 +560,11 @@ StateCircle_Context::make_circle(const Point& _p1, const Point& _p2)
        // Set the looping flag
        value_node_bline->set_loop(true);
 
+       if(!canvas)
+               canvas=get_canvas_view()->get_canvas();
+
+       value_node_bline->set_member_canvas(canvas);
+
        // count how many layers we're going to be creating
        int layers_to_create = this->layers_to_create();