Code

Fix self-snapping when dragging the transformation center of a selection containing...
[inkscape.git] / src / knotholder.cpp
index 5f749cfee6a7a4c48fc40b854d58983d2dfd3c7c..314ad807c5a1de383472327124a322bff06cfd6a 100644 (file)
@@ -30,6 +30,7 @@
 #include "sp-pattern.h"
 #include "style.h"
 #include "live_effects/lpeobject.h"
+#include "live_effects/effect.h"
 #include "desktop.h"
 #include "display/sp-canvas.h"
 
@@ -90,6 +91,21 @@ KnotHolder::update_knots()
     }
 }
 
+/**
+ * \brief Returns true if at least one of the KnotHolderEntities has the mouse hovering above it
+ */
+bool KnotHolder::knot_mouseover()
+{
+    for(std::list<KnotHolderEntity *>::iterator i = entity.begin(); i != entity.end(); ++i) {
+        SPKnot *knot = (*i)->knot;
+        if (knot && (knot->flags & SP_KNOT_MOUSEOVER)) {
+            return true;
+        }
+    }
+
+    return false;
+}
+
 void
 KnotHolder::knot_clicked_handler(SPKnot *knot, guint state)
 {