summaryrefslogtreecommitdiffstats
path: root/src/knot-holder-entity.cpp
diff options
context:
space:
mode:
authorJohan B. C. Engelen <jbc.engelen@swissonline.ch>2014-06-16 21:34:16 +0000
committerJohan B. C. Engelen <j.b.c.engelen@alumnus.utwente.nl>2014-06-16 21:34:16 +0000
commitba32027677dee7700542b236410411fca62ba9c7 (patch)
tree2b35f152c736f51f3899ceb93cef6786c2e4c42a /src/knot-holder-entity.cpp
parentSignalObserver: fix further refcounting issue in signal observer (diff)
downloadinkscape-ba32027677dee7700542b236410411fca62ba9c7.tar.gz
inkscape-ba32027677dee7700542b236410411fca62ba9c7.zip
fixes to LPEKnot, now usable again.
knotholder: if knot coords are non-finite, hide knot. used for hiding the lpeknot switcher knot if there are no crossings Fixed bugs: - https://launchpad.net/bugs/781893 (bzr r13428)
Diffstat (limited to 'src/knot-holder-entity.cpp')
-rw-r--r--src/knot-holder-entity.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/knot-holder-entity.cpp b/src/knot-holder-entity.cpp
index 6471124ec..6af5c6a56 100644
--- a/src/knot-holder-entity.cpp
+++ b/src/knot-holder-entity.cpp
@@ -80,13 +80,17 @@ KnotHolderEntity::~KnotHolderEntity()
void
KnotHolderEntity::update_knot()
{
- Geom::Affine const i2dt(item->i2dt_affine());
+ Geom::Point knot_pos(knot_get());
+ if (knot_pos.isFinite()) {
+ Geom::Point dp(knot_pos * item->i2dt_affine());
- Geom::Point dp(knot_get() * i2dt);
-
- _moved_connection.block();
- knot->setPosition(dp, SP_KNOT_STATE_NORMAL);
- _moved_connection.unblock();
+ _moved_connection.block();
+ knot->setPosition(dp, SP_KNOT_STATE_NORMAL);
+ _moved_connection.unblock();
+ } else {
+ // knot coords are non-finite, hide knot
+ knot->hide();
+ }
}
Geom::Point