Leave previously selected layers selected, and refresh ducks to ensure newly created...
authordooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Mon, 7 Apr 2008 15:16:44 +0000 (15:16 +0000)
committerdooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Mon, 7 Apr 2008 15:16:44 +0000 (15:16 +0000)
git-svn-id: http://svn.voria.com/code@1974 1f10aa63-cdf2-0310-b900-c93c546f37ac

synfig-studio/trunk/src/gtkmm/state_gradient.cpp
synfig-studio/trunk/src/gtkmm/state_polygon.cpp
synfig-studio/trunk/src/gtkmm/state_rectangle.cpp
synfig-studio/trunk/src/gtkmm/state_text.cpp

index 55b9277..52ead47 100644 (file)
@@ -342,6 +342,8 @@ StateGradient_Context::~StateGradient_Context()
        // Refresh the work area
        get_work_area()->queue_draw();
 
+       get_canvas_view()->queue_rebuild_ducks();
+
        //get_canvas_view()->show_tables();
 
        get_work_area()->refresh_cursor();
@@ -435,8 +437,10 @@ StateGradient_Context::make_gradient(const Point& _p1, const Point& _p2)
        get_canvas_interface()->signal_layer_new_description()(layer,layer->get_description());
 
        egress_on_selection_change=false;
+       synfigapp::SelectionManager::LayerList layer_selection(get_canvas_view()->get_selection_manager()->get_selected_layers());
        get_canvas_interface()->get_selection_manager()->clear_selected_layers();
-       get_canvas_interface()->get_selection_manager()->set_selected_layer(layer);
+       layer_selection.push_back(layer);
+       get_canvas_interface()->get_selection_manager()->set_selected_layers(layer_selection);
        egress_on_selection_change=true;
 
        reset();
index a5498fe..10c152a 100644 (file)
@@ -398,8 +398,10 @@ StatePolygon_Context::run()
                                }
                        }
                        egress_on_selection_change=false;
+                       synfigapp::SelectionManager::LayerList layer_selection(get_canvas_view()->get_selection_manager()->get_selected_layers());
                        get_canvas_interface()->get_selection_manager()->clear_selected_layers();
-                       get_canvas_interface()->get_selection_manager()->set_selected_layer(layer);
+                       layer_selection.push_back(layer);
+                       get_canvas_interface()->get_selection_manager()->set_selected_layers(layer_selection);
                        egress_on_selection_change=true;
                        //get_canvas_interface()->signal_dirty_preview()();
                }
index e672d6c..3be8344 100644 (file)
@@ -333,6 +333,8 @@ StateRectangle_Context::~StateRectangle_Context()
        // Refresh the work area
        get_work_area()->queue_draw();
 
+       get_canvas_view()->queue_rebuild_ducks();
+
        App::toolbox->refresh();
 }
 
@@ -392,8 +394,10 @@ StateRectangle_Context::make_rectangle(const Point& _p1, const Point& _p2)
        get_canvas_interface()->signal_layer_new_description()(layer,layer->get_description());
 
        egress_on_selection_change=false;
+       synfigapp::SelectionManager::LayerList layer_selection(get_canvas_view()->get_selection_manager()->get_selected_layers());
        get_canvas_interface()->get_selection_manager()->clear_selected_layers();
-       get_canvas_interface()->get_selection_manager()->set_selected_layer(layer);
+       layer_selection.push_back(layer);
+       get_canvas_interface()->get_selection_manager()->set_selected_layers(layer_selection);
        egress_on_selection_change=true;
 
        //post clean up stuff...
index dd2bba5..f1da4e6 100644 (file)
@@ -347,6 +347,8 @@ StateText_Context::~StateText_Context()
 
        get_work_area()->queue_draw();
 
+       get_canvas_view()->queue_rebuild_ducks();
+
        App::toolbox->refresh();
 }
 
@@ -382,7 +384,7 @@ StateText_Context::make_text(const Point& _point)
                canvas=layer->get_canvas();
        }
 
-       synfigapp::SelectionManager::LayerList layer_selection;
+       synfigapp::SelectionManager::LayerList layer_selection(get_canvas_view()->get_selection_manager()->get_selected_layers());
 
        const synfig::TransformStack& transform(get_canvas_view()->get_curr_transform_stack());
        const Point point(transform.unperform(_point));