Code

UI fixes (a.o. Bug #560751 )
[inkscape.git] / src / live_effects / lpe-interpolate.cpp
index e19d2e6e744701bacce89e7116d6610101b7b1b1..47965749e81e30265b61f69dc94e18587f4c8573 100644 (file)
@@ -27,8 +27,8 @@ namespace LivePathEffect {
 
 LPEInterpolate::LPEInterpolate(LivePathEffectObject *lpeobject) :
     Effect(lpeobject),
-    trajectory_path(_("Trajectory"), _("Path along which intermediate steps are created."), "trajectory", &wr, this, "M0,0 L0,0"),
-    number_of_steps(_("Steps"), _("Determines the number of steps from start to end path."), "steps", &wr, this, 5),
+    trajectory_path(_("Trajectory:"), _("Path along which intermediate steps are created."), "trajectory", &wr, this, "M0,0 L0,0"),
+    number_of_steps(_("Steps:"), _("Determines the number of steps from start to end path."), "steps", &wr, this, 5),
     equidistant_spacing(_("Equidistant spacing"), _("If true, the spacing between intermediates is constant along the length of the path. If false, the distance depends on the location of the nodes of the trajectory path."), "equidistant_spacing", &wr, this, true)
 {
     show_orig_path = true;
@@ -52,8 +52,13 @@ LPEInterpolate::~LPEInterpolate()
 Geom::PathVector
 LPEInterpolate::doEffect_path (Geom::PathVector const & path_in)
 {
-    if ( (path_in.size() < 2) || (number_of_steps < 2))
+    if ( (path_in.size() < 2) || (number_of_steps < 2)) {
         return path_in;
+    }
+    // Don't allow empty path parameter:
+    if ( trajectory_path.get_pathvector().empty() ) {
+        return path_in;
+    }
 
     std::vector<Geom::Path> path_out;