From: dooglus Date: Sun, 16 Sep 2007 19:28:39 +0000 (+0000) Subject: I'm working on bug 1779592. The problem is related to the 'no_egress_on_selection_ch... X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=fb79e7ea31ff262ac2d6802f5946f902b1abbb14;p=synfig.git I'm working on bug 1779592. The problem is related to the 'no_egress_on_selection_change' variable, and the double-negatives aren't making things any less confusing. So I renamed it to 'egress_on_selection_change' instead, and changed the sense of its value. git-svn-id: http://svn.voria.com/code@680 1f10aa63-cdf2-0310-b900-c93c546f37ac --- diff --git a/synfig-studio/trunk/src/gtkmm/state_bline.cpp b/synfig-studio/trunk/src/gtkmm/state_bline.cpp index dc543ff..0b61bb1 100644 --- a/synfig-studio/trunk/src/gtkmm/state_bline.cpp +++ b/synfig-studio/trunk/src/gtkmm/state_bline.cpp @@ -186,10 +186,10 @@ public: bool run_(); bool run(); - 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; } @@ -338,7 +338,7 @@ StateBLine_Context::StateBLine_Context(CanvasView* canvas_view): spin_feather(adj_feather,0.01,4) { depth=-1; - no_egress_on_selection_change=false; + egress_on_selection_change=true; load_settings(); // Set up the tool options dialog @@ -695,10 +695,10 @@ StateBLine_Context::run_() }*/ } - 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_layers(layer_selection); - no_egress_on_selection_change=false; + egress_on_selection_change=true; //if(finish_bline_dialog.get_region_flag() || finish_bline_dialog.get_bline_flag()) // get_canvas_interface()->signal_dirty_preview()(); diff --git a/synfig-studio/trunk/src/gtkmm/state_circle.cpp b/synfig-studio/trunk/src/gtkmm/state_circle.cpp index 791b555..f4e0768 100644 --- a/synfig-studio/trunk/src/gtkmm/state_circle.cpp +++ b/synfig-studio/trunk/src/gtkmm/state_circle.cpp @@ -147,10 +147,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; } @@ -279,7 +279,7 @@ StateCircle_Context::StateCircle_Context(CanvasView* canvas_view): spin_feather(adj_feather,0.1,3), check_invert(_("Invert")) { - no_egress_on_selection_change=false; + egress_on_selection_change=true; // Set up the tool options dialog //options_table.attach(*manage(new Gtk::Label(_("Circle Tool"))), 0, 2, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0); options_table.attach(entry_id, 0, 2, 1, 2, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0); @@ -437,10 +437,10 @@ StateCircle_Context::make_circle(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; } reset(); diff --git a/synfig-studio/trunk/src/gtkmm/state_gradient.cpp b/synfig-studio/trunk/src/gtkmm/state_gradient.cpp index 81c3800..f4f1963 100644 --- a/synfig-studio/trunk/src/gtkmm/state_gradient.cpp +++ b/synfig-studio/trunk/src/gtkmm/state_gradient.cpp @@ -133,10 +133,10 @@ public: void increment_id(); void make_gradient(const Point& p1, const Point& p2); - 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 +248,7 @@ StateGradient_Context::StateGradient_Context(CanvasView* canvas_view): prev_workarea_layer_status_(get_work_area()->get_allow_layer_clicks()), entry_id() { - no_egress_on_selection_change=false; + egress_on_selection_change=true; // Set up the tool options dialog ///options_table.attach(*manage(new Gtk::Label(_("Gradient Tool"))), 0, 2, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0); options_table.attach(entry_id, 0, 2, 1, 2, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0); @@ -429,10 +429,10 @@ StateGradient_Context::make_gradient(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; reset(); increment_id(); diff --git a/synfig-studio/trunk/src/gtkmm/state_polygon.cpp b/synfig-studio/trunk/src/gtkmm/state_polygon.cpp index 2b9071c..afe6a5b 100644 --- a/synfig-studio/trunk/src/gtkmm/state_polygon.cpp +++ b/synfig-studio/trunk/src/gtkmm/state_polygon.cpp @@ -118,10 +118,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; } @@ -221,7 +221,7 @@ StatePolygon_Context::StatePolygon_Context(CanvasView* canvas_view): entry_id(), button_make(_("Make")) { - no_egress_on_selection_change=false; + egress_on_selection_change=true; load_settings(); // Set up the tool options dialog @@ -390,10 +390,10 @@ StatePolygon_Context::run() return; } } - 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; //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 5511ad0..c58d6bd 100644 --- a/synfig-studio/trunk/src/gtkmm/state_rectangle.cpp +++ b/synfig-studio/trunk/src/gtkmm/state_rectangle.cpp @@ -128,10 +128,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 +248,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 +386,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();