summaryrefslogtreecommitdiffstats
path: root/src/live_effects/parameter/filletchamferpointarray.cpp
diff options
context:
space:
mode:
authorLiam P. White <inkscapebrony@gmail.com>2014-08-12 21:37:42 +0000
committerLiam P. White <inkscapebrony@gmail.com>2014-08-12 21:37:42 +0000
commit78d439326a4dd26599853295e62b9f63136fc2f3 (patch)
treefc5159d3cbd5ae8e3564c961c8c3f2cc18e96e0f /src/live_effects/parameter/filletchamferpointarray.cpp
parentUpdate to experimental r13465 (diff)
parentupdating pot files (diff)
downloadinkscape-78d439326a4dd26599853295e62b9f63136fc2f3.tar.gz
inkscape-78d439326a4dd26599853295e62b9f63136fc2f3.zip
Update to experimental r13479
(bzr r13090.1.103)
Diffstat (limited to 'src/live_effects/parameter/filletchamferpointarray.cpp')
-rw-r--r--src/live_effects/parameter/filletchamferpointarray.cpp82
1 files changed, 48 insertions, 34 deletions
diff --git a/src/live_effects/parameter/filletchamferpointarray.cpp b/src/live_effects/parameter/filletchamferpointarray.cpp
index 33096819c..47cdd27cc 100644
--- a/src/live_effects/parameter/filletchamferpointarray.cpp
+++ b/src/live_effects/parameter/filletchamferpointarray.cpp
@@ -333,10 +333,10 @@ void FilletChamferPointArrayParam::recalculate_knots(
result.push_back(Point(xPos, 0));
}
++curve_it1;
- ++curve_it2;
if (curve_it2 != curve_endit) {
- counter++;
+ ++curve_it2;
}
+ counter++;
counterCurves++;
}
}
@@ -553,31 +553,40 @@ Point FilletChamferPointArrayParamKnotHolderEntity::knot_get() const
void FilletChamferPointArrayParamKnotHolderEntity::knot_click(guint state)
{
if (state & GDK_CONTROL_MASK) {
- using namespace Geom;
- double type = _pparam->_vector.at(_index)[Y] + 1;
- if (type > 4) {
- type = 1;
- }
- _pparam->_vector.at(_index) = Point(_pparam->_vector.at(_index)[X], type);
- _pparam->param_set_and_write_new_value(_pparam->_vector);
- sp_lpe_item_update_patheffect(SP_LPE_ITEM(item), false, false);
- const gchar *tip;
- if (type == 3) {
- tip = _("<b>Chamfer</b>: <b>Ctrl+click</b> toogle type, "
- "<b>Shift+click</b> open dialog");
- } else if (type == 2) {
- tip = _("<b>Inverse Fillet</b>: <b>Ctrl+click</b> toogle type, "
- "<b>Shift+click</b> open dialog");
- } else if (type == 1) {
- tip = _("<b>Fillet</b>: <b>Ctrl+click</b> toogle type, "
- "<b>Shift+click</b> open dialog");
- } else {
- tip = _("<b>Double Chamfer</b>: <b>Ctrl+click</b> toogle type, "
- "<b>Shift+click</b> open dialog");
+ if (state & GDK_MOD1_MASK) {
+ _pparam->_vector.at(_index) = Point(_index, _pparam->_vector.at(_index)[Y]);
+ _pparam->param_set_and_write_new_value(_pparam->_vector);
+ sp_lpe_item_update_patheffect(SP_LPE_ITEM(item), false, false);
+ }else{
+ using namespace Geom;
+ double type = _pparam->_vector.at(_index)[Y] + 1;
+ if (type > 4) {
+ type = 1;
+ }
+ _pparam->_vector.at(_index) = Point(_pparam->_vector.at(_index)[X], type);
+ _pparam->param_set_and_write_new_value(_pparam->_vector);
+ sp_lpe_item_update_patheffect(SP_LPE_ITEM(item), false, false);
+ const gchar *tip;
+ if (type == 3) {
+ tip = _("<b>Chamfer</b>: <b>Ctrl+Click</b> toogle type, "
+ "<b>Shift+Click</b> open dialog, "
+ "<b>Ctrl+Alt+Click</b> reset");
+ } else if (type == 2) {
+ tip = _("<b>Inverse Fillet</b>: <b>Ctrl+Click</b> toogle type, "
+ "<b>Shift+Click</b> open dialog, "
+ "<b>Ctrl+Alt+Click</b> reset");
+ } else if (type == 1) {
+ tip = _("<b>Fillet</b>: <b>Ctrl+Click</b> toogle type, "
+ "<b>Shift+Click</b> open dialog, "
+ "<b>Ctrl+Alt+Click</b> reset");
+ } else {
+ tip = _("<b>Double Chamfer</b>: <b>Ctrl+Click</b> toogle type, "
+ "<b>Shift+Click</b> open dialog, "
+ "<b>Ctrl+Alt+Click</b> reset");
+ }
+ this->knot->tip = g_strdup(tip);
+ this->knot->show();
}
- this->knot->tip = g_strdup(tip);
- this->knot->show();
- //}
} else if ((state & GDK_MOD1_MASK) || (state & GDK_SHIFT_MASK)) {
Geom::Point offset = Geom::Point(_pparam->_vector.at(_index).x(),
_pparam->_vector.at(_index).y());
@@ -620,18 +629,23 @@ void FilletChamferPointArrayParam::addKnotHolderEntities(KnotHolder *knotholder,
}
const gchar *tip;
if (_vector[i][Y] == 3) {
- tip = _("<b>Chamfer</b>: <b>Ctrl+click</b> toogle type, "
- "<b>Shift+click</b> open dialog");
+ tip = _("<b>Chamfer</b>: <b>Ctrl+Click</b> toogle type, "
+ "<b>Shift+Click</b> open dialog, "
+ "<b>Ctrl+Alt+Click</b> reset");
} else if (_vector[i][Y] == 2) {
- tip = _("<b>Inverse Fillet</b>: <b>Ctrl+click</b> toogle type, "
- "<b>Shift+click</b> open dialog");
+ tip = _("<b>Inverse Fillet</b>: <b>Ctrl+Click</b> toogle type, "
+ "<b>Shift+Click</b> open dialog, "
+ "<b>Ctrl+Alt+Click</b> reset");
} else if (_vector[i][Y] == 1) {
- tip = _("<b>Fillet</b>: <b>Ctrl+click</b> toogle type, "
- "<b>Shift+click</b> open dialog");
+ tip = _("<b>Fillet</b>: <b>Ctrl+Click</b> toogle type, "
+ "<b>Shift+Click</b> open dialog, "
+ "<b>Ctrl+Alt+Click</b> reset");
} else {
- tip = _("<b>Double Chamfer</b>: <b>Ctrl+click</b> toogle type, "
- "<b>Shift+click</b> open dialog");
+ tip = _("<b>Double Chamfer</b>: <b>Ctrl+Click</b> toogle type, "
+ "<b>Shift+Click</b> open dialog, "
+ "<b>Ctrl+Alt+Click</b> reset");
}
+
FilletChamferPointArrayParamKnotHolderEntity *e =
new FilletChamferPointArrayParamKnotHolderEntity(this, i);
e->create(desktop, item, knotholder, Inkscape::CTRL_TYPE_UNKNOWN, _(tip),