From: dooglus Date: Mon, 7 Apr 2008 15:16:44 +0000 (+0000) Subject: Leave previously selected layers selected, and refresh ducks to ensure newly created... X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=06487125ca0c9355a765183cc1096885a8f55e3e;p=synfig.git Leave previously selected layers selected, and refresh ducks to ensure newly created layers are fully selected. git-svn-id: http://svn.voria.com/code@1974 1f10aa63-cdf2-0310-b900-c93c546f37ac --- diff --git a/synfig-studio/trunk/src/gtkmm/state_gradient.cpp b/synfig-studio/trunk/src/gtkmm/state_gradient.cpp index 55b9277..52ead47 100644 --- a/synfig-studio/trunk/src/gtkmm/state_gradient.cpp +++ b/synfig-studio/trunk/src/gtkmm/state_gradient.cpp @@ -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(); diff --git a/synfig-studio/trunk/src/gtkmm/state_polygon.cpp b/synfig-studio/trunk/src/gtkmm/state_polygon.cpp index a5498fe..10c152a 100644 --- a/synfig-studio/trunk/src/gtkmm/state_polygon.cpp +++ b/synfig-studio/trunk/src/gtkmm/state_polygon.cpp @@ -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()(); } diff --git a/synfig-studio/trunk/src/gtkmm/state_rectangle.cpp b/synfig-studio/trunk/src/gtkmm/state_rectangle.cpp index e672d6c..3be8344 100644 --- a/synfig-studio/trunk/src/gtkmm/state_rectangle.cpp +++ b/synfig-studio/trunk/src/gtkmm/state_rectangle.cpp @@ -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... diff --git a/synfig-studio/trunk/src/gtkmm/state_text.cpp b/synfig-studio/trunk/src/gtkmm/state_text.cpp index dd2bba5..f1da4e6 100644 --- a/synfig-studio/trunk/src/gtkmm/state_text.cpp +++ b/synfig-studio/trunk/src/gtkmm/state_text.cpp @@ -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));