From: Nikita Kitaev Date: Mon, 11 Jan 2010 04:51:01 +0000 (-0800) Subject: Replace egress on selection change with entering state_normal X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=22ff6846bc3300d2c6e6eb0f95b6c509331a0074;p=synfig.git Replace egress on selection change with entering state_normal Toolbox no longer auto-presents itself when the normal tool is clicked or Synfig Studio is lauched to avoid problems if it is tabbed with the Layers panel. --- diff --git a/synfig-studio/src/gtkmm/state_bline.cpp b/synfig-studio/src/gtkmm/state_bline.cpp index 7a27d84..f5cbdd3 100644 --- a/synfig-studio/src/gtkmm/state_bline.cpp +++ b/synfig-studio/src/gtkmm/state_bline.cpp @@ -36,6 +36,7 @@ #include #include "state_bline.h" +#include "state_normal.h" #include "canvasview.h" #include "workarea.h" #include "app.h" @@ -205,7 +206,7 @@ public: Smach::event_result event_layer_selection_changed_handler(const Smach::event& /*x*/) { if(egress_on_selection_change) - throw Smach::egress_exception(); + throw &state_normal; //throw Smach::egress_exception(); return Smach::RESULT_OK; } diff --git a/synfig-studio/src/gtkmm/state_circle.cpp b/synfig-studio/src/gtkmm/state_circle.cpp index fe82e21..865ea81 100644 --- a/synfig-studio/src/gtkmm/state_circle.cpp +++ b/synfig-studio/src/gtkmm/state_circle.cpp @@ -38,6 +38,7 @@ #include #include "state_circle.h" +#include "state_normal.h" #include "canvasview.h" #include "workarea.h" #include "app.h" @@ -208,7 +209,7 @@ public: Smach::event_result event_layer_selection_changed_handler(const Smach::event& /*x*/) { if(egress_on_selection_change) - throw Smach::egress_exception(); + throw &state_normal; //throw Smach::egress_exception(); return Smach::RESULT_OK; } diff --git a/synfig-studio/src/gtkmm/state_gradient.cpp b/synfig-studio/src/gtkmm/state_gradient.cpp index c8461b5..c0fd022 100644 --- a/synfig-studio/src/gtkmm/state_gradient.cpp +++ b/synfig-studio/src/gtkmm/state_gradient.cpp @@ -37,6 +37,7 @@ #include #include "state_gradient.h" +#include "state_normal.h" #include "canvasview.h" #include "workarea.h" #include "app.h" @@ -144,7 +145,7 @@ public: Smach::event_result event_layer_selection_changed_handler(const Smach::event& /*x*/) { if(egress_on_selection_change) - throw Smach::egress_exception(); + throw &state_normal; //throw Smach::egress_exception(); return Smach::RESULT_OK; } diff --git a/synfig-studio/src/gtkmm/state_normal.cpp b/synfig-studio/src/gtkmm/state_normal.cpp index 8228921..95be889 100644 --- a/synfig-studio/src/gtkmm/state_normal.cpp +++ b/synfig-studio/src/gtkmm/state_normal.cpp @@ -244,7 +244,7 @@ StateNormal_Context::StateNormal_Context(CanvasView* canvas_view): options_table.show_all(); refresh_tool_options(); //App::dialog_tool_options->set_widget(options_table); - App::dialog_tool_options->present(); + //App::dialog_tool_options->present(); get_work_area()->set_allow_layer_clicks(true); get_work_area()->set_duck_dragger(duck_dragger_); diff --git a/synfig-studio/src/gtkmm/state_polygon.cpp b/synfig-studio/src/gtkmm/state_polygon.cpp index c016f1d..6059648 100644 --- a/synfig-studio/src/gtkmm/state_polygon.cpp +++ b/synfig-studio/src/gtkmm/state_polygon.cpp @@ -38,6 +38,7 @@ #include #include "state_polygon.h" +#include "state_normal.h" #include "canvasview.h" #include "workarea.h" #include "app.h" @@ -171,7 +172,7 @@ public: Smach::event_result event_layer_selection_changed_handler(const Smach::event& /*x*/) { if(egress_on_selection_change) - throw Smach::egress_exception(); + throw &state_normal; //throw Smach::egress_exception(); return Smach::RESULT_OK; } diff --git a/synfig-studio/src/gtkmm/state_rectangle.cpp b/synfig-studio/src/gtkmm/state_rectangle.cpp index aa21c23..54fb072 100644 --- a/synfig-studio/src/gtkmm/state_rectangle.cpp +++ b/synfig-studio/src/gtkmm/state_rectangle.cpp @@ -38,6 +38,7 @@ #include #include "state_rectangle.h" +#include "state_normal.h" #include "canvasview.h" #include "workarea.h" #include "app.h" @@ -176,7 +177,7 @@ public: Smach::event_result event_layer_selection_changed_handler(const Smach::event& /*x*/) { if(egress_on_selection_change) - throw Smach::egress_exception(); + throw &state_normal; //throw Smach::egress_exception(); return Smach::RESULT_OK; } diff --git a/synfig-studio/src/gtkmm/state_star.cpp b/synfig-studio/src/gtkmm/state_star.cpp index e5b3ace..719e0d3 100644 --- a/synfig-studio/src/gtkmm/state_star.cpp +++ b/synfig-studio/src/gtkmm/state_star.cpp @@ -38,6 +38,7 @@ #include #include "state_star.h" +#include "state_normal.h" throw &state_normal; //throw Smach::egress_exception(); #include "canvasview.h" #include "workarea.h" #include "app.h" @@ -215,7 +216,7 @@ public: Smach::event_result event_layer_selection_changed_handler(const Smach::event& /*x*/) { if(egress_on_selection_change) - throw Smach::egress_exception(); + throw &state_normal; //throw Smach::egress_exception(); return Smach::RESULT_OK; } diff --git a/synfig-studio/src/gtkmm/state_text.cpp b/synfig-studio/src/gtkmm/state_text.cpp index 8f7d0c9..c1912ab 100644 --- a/synfig-studio/src/gtkmm/state_text.cpp +++ b/synfig-studio/src/gtkmm/state_text.cpp @@ -34,6 +34,7 @@ #include #include "state_text.h" +#include "state_normal.h" #include "canvasview.h" #include "workarea.h" #include "app.h" @@ -132,7 +133,7 @@ public: Smach::event_result event_layer_selection_changed_handler(const Smach::event& /*x*/) { if(egress_on_selection_change) - throw Smach::egress_exception(); + throw &state_normal; //throw Smach::egress_exception(); return Smach::RESULT_OK; }