X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-studio%2Ftrunk%2Fsrc%2Fgtkmm%2Fstate_polygon.cpp;h=410947a4d550edf8130646a30ca88bbdb85beb7d;hb=809d7d358384cd58df462d5cd401938245f9d3c7;hp=2b9071ca298b6372113e710f9bd8b02a08af1af2;hpb=11c0abb278300f2c4439b538b300433078a19a78;p=synfig.git diff --git a/synfig-studio/trunk/src/gtkmm/state_polygon.cpp b/synfig-studio/trunk/src/gtkmm/state_polygon.cpp index 2b9071c..410947a 100644 --- a/synfig-studio/trunk/src/gtkmm/state_polygon.cpp +++ b/synfig-studio/trunk/src/gtkmm/state_polygon.cpp @@ -47,6 +47,8 @@ #include "dialog_tooloptions.h" #include +#include "general.h" + #endif /* === U S I N G =========================================================== */ @@ -118,10 +120,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; } @@ -186,7 +188,10 @@ StatePolygon_Context::increment_id() if(id[id.size()-1]<='9' && id[id.size()-1]>='0') { // figure out how many digits it is - for(digits=0;(int)id.size()-1>=digits && id[id.size()-1-digits]<='9' && id[id.size()-1-digits]>='0';digits++)while(false); + for (digits = 0; + (int)id.size()-1 >= digits && id[id.size()-1-digits] <= '9' && id[id.size()-1-digits] >= '0'; + digits++) + ; String str_number; str_number=String(id,id.size()-digits,id.size()); @@ -221,7 +226,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 @@ -383,6 +388,7 @@ StatePolygon_Context::run() action->set_param("canvas_interface",get_canvas_interface()); action->set_param("value_desc",value_desc); action->set_param("type","dynamic_list"); + action->set_param("time",get_canvas_interface()->get_time()); if(!get_canvas_interface()->get_instance()->perform_action(action)) { group.cancel(); @@ -390,10 +396,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()(); } /* @@ -422,8 +428,9 @@ StatePolygon_Context::event_mouse_click_handler(const Smach::event& x) refresh_ducks(); return Smach::RESULT_ACCEPT; - case BUTTON_RIGHT: // Intercept the right-button click to short-circut the pop-up menu - return Smach::RESULT_ACCEPT; + case BUTTON_RIGHT: // Intercept the right-button click to short-circuit the pop-up menu + if (!getenv("SYNFIG_ENABLE_POPUP_MENU_IN_ALL_TOOLS")) + return Smach::RESULT_ACCEPT; default: return Smach::RESULT_OK;