Enable Stop button and ESC key to change to Normal Tool for the Circle, Draw,
authorCarlos Lopez <genetita@gmail.com>
Wed, 13 Jan 2010 21:55:00 +0000 (22:55 +0100)
committerCarlos Lopez <genetita@gmail.com>
Wed, 13 Jan 2010 21:55:00 +0000 (22:55 +0100)
 Eyedrop, Fill, Gradient, Rectangle, Sketch, Star, Text, Width and Zoom tools

synfig-studio/src/gtkmm/state_circle.cpp
synfig-studio/src/gtkmm/state_draw.cpp
synfig-studio/src/gtkmm/state_eyedrop.cpp
synfig-studio/src/gtkmm/state_fill.cpp
synfig-studio/src/gtkmm/state_gradient.cpp
synfig-studio/src/gtkmm/state_rectangle.cpp
synfig-studio/src/gtkmm/state_sketch.cpp
synfig-studio/src/gtkmm/state_star.cpp
synfig-studio/src/gtkmm/state_text.cpp
synfig-studio/src/gtkmm/state_width.cpp
synfig-studio/src/gtkmm/state_zoom.cpp

index 865ea81..de0c6e3 100644 (file)
@@ -532,7 +532,9 @@ StateCircle_Context::~StateCircle_Context()
 Smach::event_result
 StateCircle_Context::event_stop_handler(const Smach::event& /*x*/)
 {
-       throw Smach::egress_exception();
+       //throw Smach::egress_exception();
+       throw &state_normal;
+       return Smach::RESULT_OK;
 }
 
 Smach::event_result
index 4d058f2..3fc459b 100644 (file)
@@ -567,7 +567,9 @@ StateDraw_Context::~StateDraw_Context()
 Smach::event_result
 StateDraw_Context::event_stop_handler(const Smach::event& /*x*/)
 {
-       throw Smach::egress_exception();
+       //throw Smach::egress_exception();
+       throw &state_normal;
+       return Smach::RESULT_OK;
 }
 
 Smach::event_result
index 6fb940d..749399a 100644 (file)
@@ -113,8 +113,10 @@ StateEyedrop_Context::~StateEyedrop_Context()
 Smach::event_result
 StateEyedrop_Context::event_stop_handler(const Smach::event& /*x*/)
 {
-       synfig::info("STATE EYEDROP: Received Stop Event");
-       throw Smach::egress_exception();
+       //synfig::info("STATE EYEDROP: Received Stop Event");
+       //throw Smach::egress_exception();
+       throw &state_normal;
+       return Smach::RESULT_OK;
 //     canvas_view->get_smach().pop_state();
 //     return Smach::RESULT_ACCEPT;
 }
index 60c929a..26eb646 100644 (file)
@@ -121,7 +121,9 @@ Smach::event_result
 StateFill_Context::event_stop_handler(const Smach::event& /*x*/)
 {
        synfig::info("STATE FILL: Received Stop Event");
-       throw Smach::egress_exception();
+       //throw Smach::egress_exception();
+       throw &state_normal;
+       return Smach::RESULT_OK;
 //     canvas_view->get_smach().pop_state();
 //     return Smach::RESULT_ACCEPT;
 }
index c0fd022..bc6c3ad 100644 (file)
@@ -368,7 +368,9 @@ StateGradient_Context::~StateGradient_Context()
 Smach::event_result
 StateGradient_Context::event_stop_handler(const Smach::event& /*x*/)
 {
-       throw Smach::egress_exception();
+       //throw Smach::egress_exception();
+       throw &state_normal;
+       return Smach::RESULT_OK;
 }
 
 Smach::event_result
index 29fe0a9..5f09681 100644 (file)
@@ -445,7 +445,9 @@ StateRectangle_Context::~StateRectangle_Context()
 Smach::event_result
 StateRectangle_Context::event_stop_handler(const Smach::event& /*x*/)
 {
-       throw Smach::egress_exception();
+       //throw Smach::egress_exception();
+       throw &state_normal;
+       return Smach::RESULT_OK;
 }
 
 Smach::event_result
index b0d78f0..5db2044 100644 (file)
@@ -465,7 +465,9 @@ StateSketch_Context::event_yield_tool_options(const Smach::event& /*x*/)
 Smach::event_result
 StateSketch_Context::event_stop_handler(const Smach::event& /*x*/)
 {
-       throw Smach::egress_exception();
+       //throw Smach::egress_exception();
+       throw &state_normal;
+       return Smach::RESULT_OK;
 }
 
 Smach::event_result
index ed71e7f..dff6c4b 100644 (file)
@@ -559,7 +559,9 @@ StateStar_Context::~StateStar_Context()
 Smach::event_result
 StateStar_Context::event_stop_handler(const Smach::event& /*x*/)
 {
-       throw Smach::egress_exception();
+       //throw Smach::egress_exception();
+       throw &state_normal;
+       return Smach::RESULT_OK;
 }
 
 Smach::event_result
index 0ee03ac..68508ea 100644 (file)
@@ -358,7 +358,9 @@ StateText_Context::~StateText_Context()
 Smach::event_result
 StateText_Context::event_stop_handler(const Smach::event& /*x*/)
 {
-       throw Smach::egress_exception();
+       //throw Smach::egress_exception();
+       throw &state_normal;
+       return Smach::RESULT_OK;
 }
 
 Smach::event_result
index 1c7ef4f..37aca27 100644 (file)
@@ -356,7 +356,9 @@ StateWidth_Context::~StateWidth_Context()
 Smach::event_result
 StateWidth_Context::event_stop_handler(const Smach::event& /*x*/)
 {
-       throw Smach::egress_exception();
+       //throw Smach::egress_exception();
+       throw &state_normal;
+       return Smach::RESULT_OK;
 }
 
 Smach::event_result
index 57a2522..a4ea442 100644 (file)
@@ -164,7 +164,9 @@ StateZoom_Context::~StateZoom_Context()
 Smach::event_result
 StateZoom_Context::event_stop_handler(const Smach::event& /*x*/)
 {
-       throw Smach::egress_exception();
+       //throw Smach::egress_exception();
+       throw &state_normal;
+       return Smach::RESULT_OK;
 }
 
 Smach::event_result