summaryrefslogtreecommitdiffstats
path: root/src/gradient-drag.cpp
diff options
context:
space:
mode:
authorDiederik van Lierop <mailat-signdiedenrezidotnl>2010-02-14 20:51:07 +0000
committerDiederik van Lierop <mailat-signdiedenrezidotnl>2010-02-14 20:51:07 +0000
commit676e842cd5cf47024341afa60c4740e1b63bb2a3 (patch)
tree1f480ab2766bba5c4447d3ca0a9621c1bfa903d6 /src/gradient-drag.cpp
parentImplement snapping of gradient stops (diff)
downloadinkscape-676e842cd5cf47024341afa60c4740e1b63bb2a3.tar.gz
inkscape-676e842cd5cf47024341afa60c4740e1b63bb2a3.zip
Gradient editor: don't show pre-snap indicator when hovering above the knot of a gradient stop
(bzr r9091)
Diffstat (limited to 'src/gradient-drag.cpp')
-rw-r--r--src/gradient-drag.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/gradient-drag.cpp b/src/gradient-drag.cpp
index 0b9068b37..246573e3f 100644
--- a/src/gradient-drag.cpp
+++ b/src/gradient-drag.cpp
@@ -1662,6 +1662,22 @@ GrDrag::updateDraggers ()
}
}
+
+/**
+ * \brief Returns true if at least one of the draggers' knots has the mouse hovering above it
+ */
+
+bool
+GrDrag::mouseOver()
+{
+ for (GList const* i = this->draggers; i != NULL; i = i->next) {
+ GrDragger *d = (GrDragger *) i->data;
+ if (d->knot && (d->knot->flags & SP_KNOT_MOUSEOVER)) {
+ return true;
+ }
+ }
+ return false;
+}
/**
Regenerates the lines list from the current selection; is called on each move of a dragger, so that
lines are always in sync with the actual gradient