X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-studio%2Ftrunk%2Fsrc%2Fgtkmm%2Fstate_bline.cpp;h=1b7dacacbe9ea16a0ad6381b768aa3c798f146d3;hb=e087a029fdfec516e8628e09763e0e6b0ffd9379;hp=4eccbd035434e61f6d5c34bb6f94eed03e451a84;hpb=b5df09537db8e1aa4463806be8d70d56140328be;p=synfig.git diff --git a/synfig-studio/trunk/src/gtkmm/state_bline.cpp b/synfig-studio/trunk/src/gtkmm/state_bline.cpp index 4eccbd0..1b7daca 100644 --- a/synfig-studio/trunk/src/gtkmm/state_bline.cpp +++ b/synfig-studio/trunk/src/gtkmm/state_bline.cpp @@ -217,15 +217,15 @@ public: StateBLine::StateBLine(): Smach::state("bline") { - insert(event_def(EVENT_LAYER_SELECTION_CHANGED,&StateBLine_Context::event_layer_selection_changed_handler)); - insert(event_def(EVENT_STOP,&StateBLine_Context::event_stop_handler)); - insert(event_def(EVENT_REFRESH,&StateBLine_Context::event_refresh_handler)); - insert(event_def(EVENT_REFRESH_DUCKS,&StateBLine_Context::event_hijack)); - insert(event_def(EVENT_WORKAREA_MOUSE_BUTTON_DOWN,&StateBLine_Context::event_mouse_click_handler)); - insert(event_def(EVENT_WORKAREA_MOUSE_BUTTON_UP,&StateBLine_Context::event_mouse_release_handler)); - insert(event_def(EVENT_WORKAREA_MOUSE_MOTION,&StateBLine_Context::event_mouse_motion_handler)); - insert(event_def(EVENT_WORKAREA_MOUSE_BUTTON_DRAG,&StateBLine_Context::event_mouse_motion_handler)); - insert(event_def(EVENT_REFRESH_TOOL_OPTIONS,&StateBLine_Context::event_refresh_tool_options)); + insert(event_def(EVENT_LAYER_SELECTION_CHANGED, &StateBLine_Context::event_layer_selection_changed_handler)); + insert(event_def(EVENT_STOP, &StateBLine_Context::event_stop_handler)); + insert(event_def(EVENT_REFRESH, &StateBLine_Context::event_refresh_handler)); + insert(event_def(EVENT_REFRESH_DUCKS, &StateBLine_Context::event_hijack)); + insert(event_def(EVENT_WORKAREA_MOUSE_BUTTON_DOWN, &StateBLine_Context::event_mouse_click_handler)); + insert(event_def(EVENT_WORKAREA_MOUSE_BUTTON_UP, &StateBLine_Context::event_mouse_release_handler)); + insert(event_def(EVENT_WORKAREA_MOUSE_MOTION, &StateBLine_Context::event_mouse_motion_handler)); + insert(event_def(EVENT_WORKAREA_MOUSE_BUTTON_DRAG, &StateBLine_Context::event_mouse_motion_handler)); + insert(event_def(EVENT_REFRESH_TOOL_OPTIONS, &StateBLine_Context::event_refresh_tool_options)); } StateBLine::~StateBLine() @@ -607,6 +607,9 @@ StateBLine_Context::run_() synfigapp::SelectionManager::LayerList layer_selection; + // count how many layers we're going to be creating + int layers_to_create = this->layers_to_create(); + /////////////////////////////////////////////////////////////////////////// // C U R V E G R A D I E N T /////////////////////////////////////////////////////////////////////////// @@ -642,7 +645,8 @@ StateBLine_Context::run_() } } - if (get_layer_link_offsets_flag()) + // only link the curve gradient's offset parameter if the option is selected and we're creating more than one layer + if (get_layer_link_offsets_flag() && layers_to_create > 1) { synfigapp::Action::Handle action(synfigapp::Action::create("layer_param_connect")); assert(action); @@ -700,7 +704,8 @@ StateBLine_Context::run_() } } - if (get_layer_link_offsets_flag()) + // only link the plant's offset parameter if the option is selected and we're creating more than one layer + if (get_layer_link_offsets_flag() && layers_to_create > 1) { synfigapp::Action::Handle action(synfigapp::Action::create("layer_param_connect")); assert(action); @@ -769,7 +774,8 @@ StateBLine_Context::run_() } } - if (get_layer_link_offsets_flag()) + // only link the region's offset parameter if the option is selected and we're creating more than one layer + if (get_layer_link_offsets_flag() && layers_to_create > 1) { synfigapp::Action::Handle action(synfigapp::Action::create("layer_param_connect")); assert(action); @@ -832,7 +838,8 @@ StateBLine_Context::run_() } } - if (get_layer_link_offsets_flag()) + // only link the outline's offset parameter if the option is selected and we're creating more than one layer + if (get_layer_link_offsets_flag() && layers_to_create > 1) { synfigapp::Action::Handle action(synfigapp::Action::create("layer_param_connect")); assert(action);