diff options
| author | Jabier Arraiza <jabier.arraiza@marker.es> | 2018-04-22 22:09:01 +0000 |
|---|---|---|
| committer | Jabier Arraiza <jabier.arraiza@marker.es> | 2018-04-23 21:37:56 +0000 |
| commit | e65551ff4a5356b86a973bcbe4ef973bdf09525c (patch) | |
| tree | 627efd33fd2695caf16a5b9f52b8b2da22a14343 | |
| parent | Remove pathh orig file (diff) | |
| download | inkscape-e65551ff4a5356b86a973bcbe4ef973bdf09525c.tar.gz inkscape-e65551ff4a5356b86a973bcbe4ef973bdf09525c.zip | |
Fix warings on updates
| -rw-r--r-- | src/object/box3d-side.cpp | 7 | ||||
| -rw-r--r-- | src/object/sp-ellipse.cpp | 11 | ||||
| -rw-r--r-- | src/object/sp-ellipse.h | 1 | ||||
| -rw-r--r-- | src/object/sp-item-group.cpp | 4 | ||||
| -rw-r--r-- | src/object/sp-path.cpp | 6 | ||||
| -rw-r--r-- | src/object/sp-path.h | 1 | ||||
| -rw-r--r-- | src/object/sp-spiral.cpp | 11 | ||||
| -rw-r--r-- | src/object/sp-spiral.h | 2 | ||||
| -rw-r--r-- | src/object/sp-star.cpp | 11 | ||||
| -rw-r--r-- | src/object/sp-star.h | 2 |
10 files changed, 26 insertions, 30 deletions
diff --git a/src/object/box3d-side.cpp b/src/object/box3d-side.cpp index 23c066b1c..c88c7a7b9 100644 --- a/src/object/box3d-side.cpp +++ b/src/object/box3d-side.cpp @@ -196,12 +196,7 @@ void Box3DSide::set_shape() { * This is very important for LPEs to work properly! (the bbox might be recalculated depending on the curve in shape)*/ SPCurve * before = this->getCurveBeforeLPE(); if (before || this->hasPathEffectRecursive()) { - if (!before || before->get_pathvector() != c->get_pathvector()){ - this->setCurveBeforeLPE(c); - sp_lpe_item_update_patheffect(this, true, false); - } else { - this->setCurveBeforeLPE(c); - } + this->setCurveBeforeLPE(c); } else { this->setCurveInsync(c); } diff --git a/src/object/sp-ellipse.cpp b/src/object/sp-ellipse.cpp index da93e824f..76145c603 100644 --- a/src/object/sp-ellipse.cpp +++ b/src/object/sp-ellipse.cpp @@ -481,12 +481,7 @@ void SPGenericEllipse::set_shape() * This is very important for LPEs to work properly! (the bbox might be recalculated depending on the curve in shape)*/ SPCurve * before = this->getCurveBeforeLPE(); if (before || this->hasPathEffectRecursive()) { - if (!before || before->get_pathvector() != c->get_pathvector()){ - this->setCurveBeforeLPE(c); - sp_lpe_item_update_patheffect(this, true, false); - } else { - this->setCurveBeforeLPE(c); - } + this->setCurveBeforeLPE(c); } else { this->setCurveInsync(c); } @@ -625,6 +620,10 @@ void SPGenericEllipse::modified(guint flags) SPShape::modified(flags); } +void SPGenericEllipse::update_patheffect(bool write) { + SPShape::update_patheffect(write); +} + void SPGenericEllipse::normalize() { Geom::AngleInterval a(this->start, this->end, true); diff --git a/src/object/sp-ellipse.h b/src/object/sp-ellipse.h index 0aa3dd1c6..a173f39f1 100644 --- a/src/object/sp-ellipse.h +++ b/src/object/sp-ellipse.h @@ -65,6 +65,7 @@ public: virtual const char *displayName() const; virtual void set_shape(); + virtual void update_patheffect(bool write); virtual Geom::Affine set_transform(Geom::Affine const &xform); virtual void snappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape::SnapPreferences const *snapprefs) const; diff --git a/src/object/sp-item-group.cpp b/src/object/sp-item-group.cpp index 3d89a524d..602c4558c 100644 --- a/src/object/sp-item-group.cpp +++ b/src/object/sp-item-group.cpp @@ -970,9 +970,9 @@ sp_group_perform_patheffect(SPGroup *group, SPGroup *top_group, Inkscape::LivePa // only run LPEs when the shape has a curve defined if (c) { lpe->pathvector_before_effect = c->get_pathvector(); - c->transform(i2anc_affine(sub_item, top_group)); + c->transform(i2anc_affine(sub_shape, top_group)); success = top_group->performOnePathEffect(c, sub_shape, lpe); - c->transform(i2anc_affine(sub_item, top_group).inverse()); + c->transform(i2anc_affine(sub_shape, top_group).inverse()); Inkscape::XML::Node *repr = sub_item->getRepr(); if (c && success) { sub_shape->setCurveInsync(c); diff --git a/src/object/sp-path.cpp b/src/object/sp-path.cpp index 49a0a6e46..4d1f1311f 100644 --- a/src/object/sp-path.cpp +++ b/src/object/sp-path.cpp @@ -246,8 +246,6 @@ void SPPath::set(unsigned int key, const gchar* value) { } else { this->setCurve(NULL); } - - this->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG); break; case SP_PROP_MARKER: @@ -307,6 +305,10 @@ g_message("sp_path_write writes 'd' attribute"); return repr; } +void SPPath::update_patheffect(bool write) { + SPShape::update_patheffect(write); +} + void SPPath::update(SPCtx *ctx, guint flags) { if (flags & (SP_OBJECT_MODIFIED_FLAG | SP_OBJECT_STYLE_MODIFIED_FLAG | SP_OBJECT_VIEWPORT_MODIFIED_FLAG)) { flags &= ~SP_OBJECT_USER_MODIFIED_FLAG_B; // since we change the description, it's not a "just translation" anymore diff --git a/src/object/sp-path.h b/src/object/sp-path.h index 3402938a1..661e346f7 100644 --- a/src/object/sp-path.h +++ b/src/object/sp-path.h @@ -42,6 +42,7 @@ public: virtual void update(SPCtx* ctx, unsigned int flags); virtual void set(unsigned int key, char const* value); + virtual void update_patheffect(bool write); virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, unsigned int flags); virtual const char* displayName() const; diff --git a/src/object/sp-spiral.cpp b/src/object/sp-spiral.cpp index ce5bda9a9..40abff7d7 100644 --- a/src/object/sp-spiral.cpp +++ b/src/object/sp-spiral.cpp @@ -349,12 +349,7 @@ void SPSpiral::set_shape() { * This is very important for LPEs to work properly! (the bbox might be recalculated depending on the curve in shape)*/ SPCurve * before = this->getCurveBeforeLPE(); if (before || this->hasPathEffectRecursive()) { - if (!before || before->get_pathvector() != c->get_pathvector()){ - this->setCurveBeforeLPE(c); - sp_lpe_item_update_patheffect(this, true, false); - } else { - this->setCurveBeforeLPE(c); - } + this->setCurveBeforeLPE(c); } else { this->setCurveInsync(c); } @@ -457,6 +452,10 @@ Geom::Affine SPSpiral::set_transform(Geom::Affine const &xform) return ret; } +void SPSpiral::update_patheffect(bool write) { + SPShape::update_patheffect(write); +} + /** * Return one of the points on the spiral. * diff --git a/src/object/sp-spiral.h b/src/object/sp-spiral.h index 138eae914..672c913dd 100644 --- a/src/object/sp-spiral.h +++ b/src/object/sp-spiral.h @@ -69,7 +69,7 @@ public: virtual void snappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape::SnapPreferences const *snapprefs) const; virtual const char* displayName() const; virtual char* description() const; - + virtual void update_patheffect(bool write); virtual void set_shape(); private: diff --git a/src/object/sp-star.cpp b/src/object/sp-star.cpp index a25a724ea..1be7651f8 100644 --- a/src/object/sp-star.cpp +++ b/src/object/sp-star.cpp @@ -432,12 +432,7 @@ void SPStar::set_shape() { * This is very important for LPEs to work properly! (the bbox might be recalculated depending on the curve in shape)*/ SPCurve * before = this->getCurveBeforeLPE(); if (before || this->hasPathEffectRecursive()) { - if (!before || before->get_pathvector() != c->get_pathvector()){ - this->setCurveBeforeLPE(c); - sp_lpe_item_update_patheffect(this, true, false); - } else { - this->setCurveBeforeLPE(c); - } + this->setCurveBeforeLPE(c); } else { this->setCurveInsync(c); } @@ -541,6 +536,10 @@ Geom::Affine SPStar::set_transform(Geom::Affine const &xform) return ret; } +void SPStar::update_patheffect(bool write) { + SPShape::update_patheffect(write); +} + /** * sp_star_get_xy: Get X-Y value as item coordinate system * @star: star item diff --git a/src/object/sp-star.h b/src/object/sp-star.h index 86f3e8ef9..e09f82741 100644 --- a/src/object/sp-star.h +++ b/src/object/sp-star.h @@ -53,7 +53,7 @@ public: virtual const char* displayName() const; virtual char* description() const; virtual void snappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape::SnapPreferences const *snapprefs) const; - + virtual void update_patheffect(bool write); virtual void set_shape(); virtual Geom::Affine set_transform(Geom::Affine const& xform); }; |
