summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2016-05-21 21:06:15 +0000
committerjabiertxof <info@marker.es>2016-05-21 21:06:15 +0000
commitc511141b70995ca7295df4ae244d7cc626f6ab73 (patch)
tree3e49958e4700d1f91755e25e69aefc626966a922 /src
parentupdate to trunk (diff)
downloadinkscape-c511141b70995ca7295df4ae244d7cc626f6ab73.tar.gz
inkscape-c511141b70995ca7295df4ae244d7cc626f6ab73.zip
Update to refresh knots
(bzr r13645.1.139)
Diffstat (limited to 'src')
-rw-r--r--src/helper/geom-pointwise.cpp2
-rw-r--r--src/helper/geom-pointwise.h2
-rw-r--r--src/live_effects/lpe-fillet-chamfer.cpp12
-rw-r--r--src/live_effects/parameter/array.cpp18
4 files changed, 18 insertions, 16 deletions
diff --git a/src/helper/geom-pointwise.cpp b/src/helper/geom-pointwise.cpp
index 6ed6e8f83..5531bb849 100644
--- a/src/helper/geom-pointwise.cpp
+++ b/src/helper/geom-pointwise.cpp
@@ -46,7 +46,7 @@ size_t Pointwise::getTotalSatellites()
return counter;
}
-void Pointwise::recalculateForNewPathVector(Geom::PathVector const pathv, Satellite const &S)
+void Pointwise::recalculateForNewPathVector(Geom::PathVector const pathv, Satellite const S)
{
Satellites satellites;
for (size_t i = 0; i < pathv.size(); i++) {
diff --git a/src/helper/geom-pointwise.h b/src/helper/geom-pointwise.h
index 047de8dd3..599234473 100644
--- a/src/helper/geom-pointwise.h
+++ b/src/helper/geom-pointwise.h
@@ -33,7 +33,7 @@ public:
Satellites getSatellites();
size_t getTotalSatellites();
void setSatellites(Satellites satellites);
- void recalculateForNewPathVector(Geom::PathVector const pathv, Satellite const &S);
+ void recalculateForNewPathVector(Geom::PathVector const pathv, Satellite const S);
private:
Geom::PathVector _pathvector;
Satellites _satellites;
diff --git a/src/live_effects/lpe-fillet-chamfer.cpp b/src/live_effects/lpe-fillet-chamfer.cpp
index 9c633ea57..fc31aa447 100644
--- a/src/live_effects/lpe-fillet-chamfer.cpp
+++ b/src/live_effects/lpe-fillet-chamfer.cpp
@@ -239,8 +239,11 @@ void LPEFilletChamfer::inverseChamfer()
void LPEFilletChamfer::refreshKnots()
{
- if (satellites_param.knoth) {
- satellites_param.knoth->update_knots();
+ //Find another way to update knots satellites_param.knoth->update_knots(); do the thing
+ //but not updat the knot index on node delete
+ if (tools_isactive(desktop, TOOLS_NODES)) {
+ tools_switch(desktop, TOOLS_SELECT);
+ tools_switch(desktop, TOOLS_NODES);
}
}
@@ -413,13 +416,12 @@ void LPEFilletChamfer::doBeforeEffect(SPLPEItem const *lpeItem)
satellite.setHasMirror(mirror_knots);
satellite.setHidden(hide_knots);
pointwise.recalculateForNewPathVector(pathv, satellite);
- satellites_param.setPointwise(pointwise);
} else {
pointwise.setPathVector(pathv);
pointwise.setSatellites(satellites);
- satellites_param.setPointwise(pointwise);
- refreshKnots();
}
+ satellites_param.setPointwise(pointwise);
+ refreshKnots();
} else {
g_warning("LPE Fillet can only be applied to shapes (not groups).");
}
diff --git a/src/live_effects/parameter/array.cpp b/src/live_effects/parameter/array.cpp
index 3d2e7773d..4e3037904 100644
--- a/src/live_effects/parameter/array.cpp
+++ b/src/live_effects/parameter/array.cpp
@@ -60,21 +60,21 @@ ArrayParam<std::vector<Satellite > >::readsvg(const gchar * str)
while (*iter != NULL) {
gchar ** strsubarray = g_strsplit(*iter, ",", 7);
if(*strsubarray[6]){
- Satellite satellite;
- satellite.setSatelliteType(g_strstrip(strsubarray[0]));
- satellite.is_time = strncmp(strsubarray[1],"1",1) == 0;
- satellite.has_mirror = strncmp(strsubarray[2],"1",1) == 0;
- satellite.hidden = strncmp(strsubarray[3],"1",1) == 0;
+ Satellite *satellite = new Satellite();
+ satellite->setSatelliteType(g_strstrip(strsubarray[0]));
+ satellite->is_time = strncmp(strsubarray[1],"1",1) == 0;
+ satellite->has_mirror = strncmp(strsubarray[2],"1",1) == 0;
+ satellite->hidden = strncmp(strsubarray[3],"1",1) == 0;
double amount,angle;
float stepsTmp;
sp_svg_number_read_d(strsubarray[4], &amount);
sp_svg_number_read_d(strsubarray[5], &angle);
sp_svg_number_read_f(g_strstrip(strsubarray[6]), &stepsTmp);
unsigned int steps = (unsigned int)stepsTmp;
- satellite.amount = amount;
- satellite.angle = angle;
- satellite.steps = steps;
- subpath_satellites.push_back(satellite);
+ satellite->amount = amount;
+ satellite->angle = angle;
+ satellite->steps = steps;
+ subpath_satellites.push_back(*satellite);
}
g_strfreev (strsubarray);
iter++;