summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJosh Andler <scislac@gmail.com>2009-10-08 21:25:50 +0000
committerscislac <scislac@users.sourceforge.net>2009-10-08 21:25:50 +0000
commitf54fc047a58825574b5142522fe2380572ec0e92 (patch)
treebfe28fcbd4a1a8559b7bb36cc202f71f1e3de27d /src
parentSince there was no opposition stated and otherwise people stating being okay ... (diff)
downloadinkscape-f54fc047a58825574b5142522fe2380572ec0e92.tar.gz
inkscape-f54fc047a58825574b5142522fe2380572ec0e92.zip
Patch by Johan to fix 365903.
(bzr r8748)
Diffstat (limited to 'src')
-rw-r--r--src/live_effects/lpe-knot.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/live_effects/lpe-knot.cpp b/src/live_effects/lpe-knot.cpp
index 793061b2f..340cdf633 100644
--- a/src/live_effects/lpe-knot.cpp
+++ b/src/live_effects/lpe-knot.cpp
@@ -10,6 +10,7 @@
*/
#include "sp-shape.h"
+#include "sp-path.h"
#include "display/curve.h"
#include "live_effects/lpe-knot.h"
#include "svg/svg.h"
@@ -25,6 +26,10 @@
#include <2geom/basic-intersection.h>
#include <2geom/exception.h>
+// for change crossing undo
+#include "verbs.h"
+#include "document.h"
+
#include <exception>
namespace Inkscape {
@@ -486,7 +491,12 @@ void collectPathsAndWidths (SPLPEItem const *lpeitem, std::vector<Geom::Path> &p
}
}
else if (SP_IS_SHAPE(lpeitem)) {
- SPCurve * c = sp_shape_get_curve(SP_SHAPE(lpeitem));
+ SPCurve * c = NULL;
+ if (SP_IS_PATH(lpeitem)) {
+ c = sp_path_get_curve_for_edit(SP_PATH(lpeitem));
+ } else {
+ c = sp_shape_get_curve(SP_SHAPE(lpeitem));
+ }
if (c) {
Geom::PathVector subpaths = c->get_pathvector();
for (unsigned i=0; i<subpaths.size(); i++){
@@ -623,9 +633,11 @@ KnotHolderEntityCrossingSwitcher::knot_click(guint state)
//std::cout<<"crossing set to"<<lpe->crossing_points[s].sign<<".\n";
}
lpe->crossing_points_vector.param_set_and_write_new_value(lpe->crossing_points.to_vector());
+ sp_document_done(lpe->getSPDoc(), SP_VERB_DIALOG_LIVE_PATH_EFFECT, /// @todo Is this the right verb?
+ _("Change knot crossing"));
// FIXME: this should not directly ask for updating the item. It should write to SVG, which triggers updating.
- sp_lpe_item_update_patheffect (SP_LPE_ITEM(item), false, true);
+// sp_lpe_item_update_patheffect (SP_LPE_ITEM(item), false, true);
}
}