diff options
| author | Nathan Lee <2431820-nathanal@users.noreply.gitlab.com> | 2019-05-25 10:14:13 +0000 |
|---|---|---|
| committer | Marc Jeanmougin <marcjeanmougin@free.fr> | 2019-07-15 10:35:33 +0000 |
| commit | cdfe88fdf72647144a10d3230c663977364f3d00 (patch) | |
| tree | 0aad4da5f080ed20e24cc70581194f8012440d35 /src/knot-holder-entity.h | |
| parent | Override navigation in swatch/gradient list (diff) | |
| download | inkscape-cdfe88fdf72647144a10d3230c663977364f3d00.tar.gz inkscape-cdfe88fdf72647144a10d3230c663977364f3d00.zip | |
Check knot's pattern still exists before update
Stop crash when pattern changed via swatch palette,
and knot is still present.
https://gitlab.com/inkscape/inkscape/issues/70
Diffstat (limited to '')
| -rw-r--r-- | src/knot-holder-entity.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/knot-holder-entity.h b/src/knot-holder-entity.h index e6d2ba231..1aa686f65 100644 --- a/src/knot-holder-entity.h +++ b/src/knot-holder-entity.h @@ -63,6 +63,7 @@ public: should be derived from KnotHolderEntity and override these functions */ virtual void knot_set(Geom::Point const &p, Geom::Point const &origin, unsigned int state) = 0; virtual void knot_ungrabbed(Geom::Point const &p, Geom::Point const &origin, unsigned int state) = 0; + virtual bool knot_missing() const { return false; } virtual Geom::Point knot_get() const = 0; virtual void knot_click(unsigned int /*state*/) {} @@ -108,6 +109,7 @@ protected: class PatternKnotHolderEntityXY : public KnotHolderEntity { public: PatternKnotHolderEntityXY(bool fill) : KnotHolderEntity(), _fill(fill) {} + bool knot_missing() const override; Geom::Point knot_get() const override; void knot_ungrabbed(Geom::Point const &p, Geom::Point const &origin, guint state) override {}; void knot_set(Geom::Point const &p, Geom::Point const &origin, unsigned int state) override; @@ -119,6 +121,7 @@ private: class PatternKnotHolderEntityAngle : public KnotHolderEntity { public: PatternKnotHolderEntityAngle(bool fill) : KnotHolderEntity(), _fill(fill) {} + bool knot_missing() const override; Geom::Point knot_get() const override; void knot_ungrabbed(Geom::Point const &p, Geom::Point const &origin, guint state) override {}; void knot_set(Geom::Point const &p, Geom::Point const &origin, unsigned int state) override; @@ -129,6 +132,7 @@ private: class PatternKnotHolderEntityScale : public KnotHolderEntity { public: PatternKnotHolderEntityScale(bool fill) : KnotHolderEntity(), _fill(fill) {} + bool knot_missing() const override; Geom::Point knot_get() const override; void knot_ungrabbed(Geom::Point const &p, Geom::Point const &origin, guint state) override {}; void knot_set(Geom::Point const &p, Geom::Point const &origin, unsigned int state) override; |
