From 22ff6846bc3300d2c6e6eb0f95b6c509331a0074 Mon Sep 17 00:00:00 2001 From: Nikita Kitaev Date: Sun, 10 Jan 2010 20:51:01 -0800 Subject: [PATCH] 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. --- synfig-studio/src/gtkmm/state_bline.cpp | 3 ++- synfig-studio/src/gtkmm/state_circle.cpp | 3 ++- synfig-studio/src/gtkmm/state_gradient.cpp | 3 ++- synfig-studio/src/gtkmm/state_normal.cpp | 2 +- synfig-studio/src/gtkmm/state_polygon.cpp | 3 ++- synfig-studio/src/gtkmm/state_rectangle.cpp | 3 ++- synfig-studio/src/gtkmm/state_star.cpp | 3 ++- synfig-studio/src/gtkmm/state_text.cpp | 3 ++- 8 files changed, 15 insertions(+), 8 deletions(-) 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; } -- 2.7.4