Release 0.61.08
[synfig.git] / synfig-studio / tags / stable / src / gtkmm / state_circle.cpp
index 2484e1a..f4e0768 100644 (file)
@@ -147,10 +147,10 @@ public:
        void save_settings();
        void reset();
        void increment_id();
-       bool no_egress_on_selection_change;
-       Smach::event_result event_layer_selection_changed_handler(const Smach::event& x)
+       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;
        }
@@ -272,14 +272,14 @@ StateCircle_Context::StateCircle_Context(CanvasView* canvas_view):
        canvas_view_(canvas_view),
        is_working(*canvas_view),
        duckmatic_push(get_work_area()),
-       prev_workarea_layer_status_(get_work_area()->allow_layer_clicks),
+       prev_workarea_layer_status_(get_work_area()->get_allow_layer_clicks()),
        settings(synfigapp::Main::get_selected_input_device()->settings()),
        entry_id(),
        adj_feather(0,0,1,0.01,0.1),
        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);
@@ -315,7 +315,7 @@ StateCircle_Context::StateCircle_Context(CanvasView* canvas_view):
        App::dialog_tool_options->present();
 
        // Turn off layer clicking
-       get_work_area()->allow_layer_clicks=false;
+       get_work_area()->set_allow_layer_clicks(false);
 
        // clear out the ducks
        get_work_area()->clear_ducks();
@@ -347,7 +347,7 @@ StateCircle_Context::refresh_tool_options()
 }
 
 Smach::event_result
-StateCircle_Context::event_refresh_tool_options(const Smach::event& x)
+StateCircle_Context::event_refresh_tool_options(const Smach::event& /*x*/)
 {
        refresh_tool_options();
        return Smach::RESULT_ACCEPT;
@@ -358,7 +358,7 @@ StateCircle_Context::~StateCircle_Context()
        save_settings();
 
        // Restore layer clicking
-       get_work_area()->allow_layer_clicks=prev_workarea_layer_status_;
+       get_work_area()->set_allow_layer_clicks(prev_workarea_layer_status_);
        get_canvas_view()->work_area->reset_cursor();
 
        App::dialog_tool_options->clear();
@@ -376,13 +376,13 @@ StateCircle_Context::~StateCircle_Context()
 }
 
 Smach::event_result
-StateCircle_Context::event_stop_handler(const Smach::event& x)
+StateCircle_Context::event_stop_handler(const Smach::event& /*x*/)
 {
        throw Smach::egress_exception();
 }
 
 Smach::event_result
-StateCircle_Context::event_refresh_handler(const Smach::event& x)
+StateCircle_Context::event_refresh_handler(const Smach::event& /*x*/)
 {
        refresh_ducks();
        return Smach::RESULT_ACCEPT;
@@ -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();