From d0da2f213e02d94a8aec40a51a3db32919e9c8e0 Mon Sep 17 00:00:00 2001 From: Jabier Arraiza Cenoz Date: Thu, 25 Jun 2015 18:49:51 +0200 Subject: Improve Tips for BSpline mode (bzr r14218) --- src/ui/tool/curve-drag-point.cpp | 9 +++++++++ src/ui/tool/node.cpp | 5 +++-- 2 files changed, 12 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/ui/tool/curve-drag-point.cpp b/src/ui/tool/curve-drag-point.cpp index d1756fa2c..e460b0fb7 100644 --- a/src/ui/tool/curve-drag-point.cpp +++ b/src/ui/tool/curve-drag-point.cpp @@ -187,6 +187,10 @@ Glib::ustring CurveDragPoint::_getTip(unsigned state) const if (_pm.empty()) return ""; if (!first || !first.next()) return ""; bool linear = first->front()->isDegenerate() && first.next()->back()->isDegenerate(); + if(state_held_shift(state) && _pm._isBSpline()){ + return C_("Path segment tip", + "Shift: drag to open or move BSpline handles"); + } if (state_held_shift(state)) { return C_("Path segment tip", "Shift: click to toggle segment selection"); @@ -195,6 +199,11 @@ Glib::ustring CurveDragPoint::_getTip(unsigned state) const return C_("Path segment tip", "Ctrl+Alt: click to insert a node"); } + if(_pm._isBSpline()){ + return C_("Path segment tip", + "BSpline segment: drag to shape the segment, doubleclick to insert node, " + "click to select (more: Shift, Ctrl+Alt)"); + } if (linear) { return C_("Path segment tip", "Linear segment: drag to convert to a Bezier segment, " diff --git a/src/ui/tool/node.cpp b/src/ui/tool/node.cpp index aa5365265..ef4439242 100644 --- a/src/ui/tool/node.cpp +++ b/src/ui/tool/node.cpp @@ -1464,13 +1464,14 @@ Glib::ustring Node::_getTip(unsigned state) const // No modifiers: assemble tip from node type char const *nodetype = node_type_to_localized_string(_type); + double power = _pm()._bsplineHandlePosition(h,h2); if (_selection.transformHandlesEnabled() && selected()) { if (_selection.size() == 1 && !isBSpline) { return format_tip(C_("Path node tip", "%s: drag to shape the path (more: Shift, Ctrl, Alt)"), nodetype); }else if(_selection.size() == 1){ return format_tip(C_("Path node tip", - "BSpline node: drag to shape the path (more: Shift, Ctrl, Alt). %g power"),_pm()._bsplineHandlePosition(h,h2)); + "BSpline node: drag to shape the path (more: Shift, Ctrl, Alt). %g power"), power); } return format_tip(C_("Path node tip", "%s: drag to shape the path, click to toggle scale/rotation handles (more: Shift, Ctrl, Alt)"), nodetype); @@ -1480,7 +1481,7 @@ Glib::ustring Node::_getTip(unsigned state) const "%s: drag to shape the path, click to select only this node (more: Shift, Ctrl, Alt)"), nodetype); }else{ return format_tip(C_("Path node tip", - "BSpline node: drag to shape the path, click to select only this node (more: Shift, Ctrl, Alt). %g power"),_pm()._bsplineHandlePosition(h,h2)); + "BSpline node: drag to shape the path, click to select only this node (more: Shift, Ctrl, Alt). %g power"), power); } } -- cgit v1.2.3 From d798a62d8347d3191aac351eb7ebef44d9fa64a3 Mon Sep 17 00:00:00 2001 From: Jabier Arraiza Cenoz Date: Thu, 25 Jun 2015 19:52:51 +0200 Subject: Fix for the bug 1468396. Fix the new bug noticed by su_v Fixed bugs: - https://launchpad.net/bugs/1468396 (bzr r14219) --- src/live_effects/parameter/filletchamferpointarray.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/live_effects/parameter/filletchamferpointarray.cpp b/src/live_effects/parameter/filletchamferpointarray.cpp index c469b5fdd..43352507e 100644 --- a/src/live_effects/parameter/filletchamferpointarray.cpp +++ b/src/live_effects/parameter/filletchamferpointarray.cpp @@ -270,6 +270,9 @@ void FilletChamferPointArrayParam::recalculate_knots( Piecewise > const &pwd2_in) { bool change = false; + if(_vector.size() == 0){ + return; + } PathVector pathv = path_from_piecewise(pwd2_in, 0.001); if (!pathv.empty()) { std::vector result; -- cgit v1.2.3