Skip to content

Commit

Permalink
Width handles aren't displayed when creating Skeleton Deformation
Browse files Browse the repository at this point in the history
  • Loading branch information
rodolforg committed Dec 19, 2021
1 parent 3e01de7 commit 01114c2
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions synfig-studio/src/gui/states/state_bone.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -428,13 +428,13 @@ StateBone_Context::StateBone_Context(CanvasView *canvas_view) :
Layer::Handle layer = get_canvas_interface()->get_selection_manager()->get_selected_layer();

if(Layer_SkeletonDeformation::Handle::cast_dynamic(layer)){
get_work_area()->set_type_mask(get_work_area()->get_type_mask() - (Duck::TYPE_TANGENT | Duck::TYPE_WIDTH));
get_work_area()->set_type_mask(get_work_area()->get_type_mask() - Duck::TYPE_TANGENT | (Duck::TYPE_WIDTH | Duck::TYPE_WIDTHPOINT_POSITION));
get_canvas_view()->toggle_duck_mask(Duck::TYPE_NONE);
layer->disable();
get_canvas_interface()->signal_layer_status_changed()(layer,false);
update_tool_options(SKELETON_DEFORMATION_TYPE);
}else{
get_work_area()->set_type_mask(get_work_area()->get_type_mask()-Duck::TYPE_TANGENT-Duck::TYPE_WIDTH);
get_work_area()->set_type_mask(get_work_area()->get_type_mask()-Duck::TYPE_TANGENT-Duck::TYPE_WIDTH-Duck::TYPE_WIDTHPOINT_POSITION);
get_canvas_view()->toggle_duck_mask(Duck::TYPE_NONE);
update_tool_options(SKELETON_TYPE);
}
Expand Down Expand Up @@ -853,15 +853,15 @@ StateBone_Context::event_layer_selection_changed_handler(const Smach::event& /*x
if(skel_layer){
set_id(settings.get_value("bone.skel_id", _("NewSkeleton")));
update_tool_options(SKELETON_TYPE);
get_work_area()->set_type_mask(get_work_area()->get_type_mask()-Duck::TYPE_TANGENT-Duck::TYPE_WIDTH);
get_work_area()->set_type_mask(get_work_area()->get_type_mask()-Duck::TYPE_TANGENT-Duck::TYPE_WIDTH-Duck::TYPE_WIDTHPOINT_POSITION);
}else if(deform_layer){
set_id(settings.get_value("bone.skel_deform_id", _("NewSkeletonDeformation")));
update_tool_options(SKELETON_DEFORMATION_TYPE);
get_work_area()->set_type_mask(get_work_area()->get_type_mask() - (Duck::TYPE_TANGENT | Duck::TYPE_WIDTH));
get_work_area()->set_type_mask(get_work_area()->get_type_mask() - (Duck::TYPE_TANGENT | Duck::TYPE_WIDTH | Duck::TYPE_WIDTHPOINT_POSITION));
layer->disable();
get_canvas_interface()->signal_layer_status_changed()(layer,false);
}else{
get_work_area()->set_type_mask(get_work_area()->get_type_mask()-Duck::TYPE_TANGENT-Duck::TYPE_WIDTH);
get_work_area()->set_type_mask(get_work_area()->get_type_mask()-Duck::TYPE_TANGENT-Duck::TYPE_WIDTH-Duck::TYPE_WIDTHPOINT_POSITION);
get_canvas_view()->toggle_duck_mask(Duck::TYPE_NONE);
}

Expand Down Expand Up @@ -960,6 +960,7 @@ StateBone_Context::update_width_duck_status(SkeletonLayerType type)
bool is_width_duck_currently_on(get_work_area()->get_type_mask()&Duck::TYPE_WIDTH);
if ((type == SKELETON_TYPE && is_width_duck_currently_on)
|| (type == SKELETON_DEFORMATION_TYPE && !is_width_duck_currently_on)) {
get_work_area()->set_type_mask(get_work_area()->get_type_mask()-Duck::TYPE_WIDTH-Duck::TYPE_WIDTHPOINT_POSITION);
get_canvas_view()->toggle_duck_mask(Duck::TYPE_WIDTH);
}
}
Expand Down

0 comments on commit 01114c2

Please sign in to comment.