summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1e31f41)
raw | patch | inline | side by side (parent: 1e31f41)
author | Diederik van Lierop <mailat-signdiedenrezidotnl> | |
Sun, 14 Feb 2010 20:51:07 +0000 (21:51 +0100) | ||
committer | Diederik van Lierop <mailat-signdiedenrezidotnl> | |
Sun, 14 Feb 2010 20:51:07 +0000 (21:51 +0100) |
src/gradient-context.cpp | patch | blob | history | |
src/gradient-drag.cpp | patch | blob | history | |
src/gradient-drag.h | patch | blob | history |
index 8bdfe2f7c9cb6281d5aa4873c66452b55ec6972d..baf6ac05b18068066d196a39b3e560f821d546c0 100644 (file)
--- a/src/gradient-context.cpp
+++ b/src/gradient-context.cpp
@@ -593,7 +593,7 @@ sp_gradient_context_root_handler(SPEventContext *event_context, GdkEvent *event)
ret = TRUE;
} else {
- if (!sp_event_context_knot_mouseover(event_context)) {
+ if (!drag->mouseOver()) {
SnapManager &m = desktop->namedview->snap_manager;
m.setup(desktop);
diff --git a/src/gradient-drag.cpp b/src/gradient-drag.cpp
index 0b9068b37343d49855e31c961c2ee7bafe3b728d..246573e3f3fc0d05de413632b0f68b5c257404a6 100644 (file)
--- a/src/gradient-drag.cpp
+++ b/src/gradient-drag.cpp
}
}
+
+/**
+ * \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
diff --git a/src/gradient-drag.h b/src/gradient-drag.h
index a53acffe6fc0997bf703d41ca20f9bcf6ff0bf5f..460d1396e7139ca6af742a36adc88dd176c9139c 100644 (file)
--- a/src/gradient-drag.h
+++ b/src/gradient-drag.h
void updateLines ();
void updateLevels ();
+ bool mouseOver();
+
void selected_move_nowrite (double x, double y, bool scale_radial);
void selected_move (double x, double y, bool write_repr = true, bool scale_radial = false);
void selected_move_screen (double x, double y);