From 676e842cd5cf47024341afa60c4740e1b63bb2a3 Mon Sep 17 00:00:00 2001 From: Diederik van Lierop Date: Sun, 14 Feb 2010 21:51:07 +0100 Subject: Gradient editor: don't show pre-snap indicator when hovering above the knot of a gradient stop (bzr r9091) --- src/gradient-drag.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/gradient-drag.cpp') 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 -- cgit v1.2.3