X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-studio%2Ftrunk%2Fsrc%2Fgtkmm%2Fstate_rectangle.cpp;h=830bdb11b4d8f51bc890fd9b59588a79617788a7;hb=047740653043b7fa79a042152a70e158f4d3ab97;hp=5511ad054c5956817c3f30e635f7752c3f6b2713;hpb=11c0abb278300f2c4439b538b300433078a19a78;p=synfig.git diff --git a/synfig-studio/trunk/src/gtkmm/state_rectangle.cpp b/synfig-studio/trunk/src/gtkmm/state_rectangle.cpp index 5511ad0..830bdb1 100644 --- a/synfig-studio/trunk/src/gtkmm/state_rectangle.cpp +++ b/synfig-studio/trunk/src/gtkmm/state_rectangle.cpp @@ -49,6 +49,8 @@ #include "duck.h" #include +#include "general.h" + #endif /* === U S I N G =========================================================== */ @@ -128,10 +130,10 @@ public: void save_settings(); void reset(); void increment_id(); - bool no_egress_on_selection_change; + bool egress_on_selection_change; Smach::event_result event_layer_selection_changed_handler(const Smach::event& /*x*/) { - if(!no_egress_on_selection_change) + if(egress_on_selection_change) throw Smach::egress_exception(); return Smach::RESULT_OK; } @@ -248,7 +250,7 @@ StateRectangle_Context::StateRectangle_Context(CanvasView* canvas_view): spin_expand(adj_expand,0.1,3), check_invert(_("Invert")) { - no_egress_on_selection_change=false; + egress_on_selection_change=true; load_settings(); // Set up the tool options dialog @@ -386,10 +388,10 @@ StateRectangle_Context::make_rectangle(const Point& _p1, const Point& _p2) layer->set_description(get_id()); get_canvas_interface()->signal_layer_new_description()(layer,layer->get_description()); - no_egress_on_selection_change=true; + egress_on_selection_change=false; get_canvas_interface()->get_selection_manager()->clear_selected_layers(); get_canvas_interface()->get_selection_manager()->set_selected_layer(layer); - no_egress_on_selection_change=false; + egress_on_selection_change=true; //post clean up stuff... reset();