summaryrefslogtreecommitdiffstats
path: root/src/gradient-context.cpp
diff options
context:
space:
mode:
authorbulia byak <buliabyak@gmail.com>2007-10-22 06:21:39 +0000
committerbuliabyak <buliabyak@users.sourceforge.net>2007-10-22 06:21:39 +0000
commite9df501afda94e3e80d4b7cf9ba5ddd30cef7592 (patch)
tree30b38d923aee83b557eb3efaecd10b5671f55ae3 /src/gradient-context.cpp
parentAllow SPFlowtexts to be used in boolean operations (diff)
downloadinkscape-e9df501afda94e3e80d4b7cf9ba5ddd30cef7592.tar.gz
inkscape-e9df501afda94e3e80d4b7cf9ba5ddd30cef7592.zip
make sure ctrl-alt-click adds node to the gradient that's actually clicked
(bzr r3939)
Diffstat (limited to 'src/gradient-context.cpp')
-rw-r--r--src/gradient-context.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gradient-context.cpp b/src/gradient-context.cpp
index 2176f3ea0..854811335 100644
--- a/src/gradient-context.cpp
+++ b/src/gradient-context.cpp
@@ -598,11 +598,13 @@ sp_gradient_context_root_handler(SPEventContext *event_context, GdkEvent *event)
if (drag->lines) {
for (GSList *l = drag->lines; (l != NULL) && (!over_line); l = l->next) {
line = (SPCtrlLine*) l->data;
- over_line |= sp_gradient_context_is_over_line (rc, (SPItem*) line, NR::Point(event->motion.x, event->motion.y));
+ over_line = sp_gradient_context_is_over_line (rc, (SPItem*) line, NR::Point(event->motion.x, event->motion.y));
+ if (over_line)
+ break;
}
}
- if (over_line) {
- sp_gradient_context_add_stop_near_point(rc, SP_ITEM(selection->itemList()->data), rc->mousepoint_doc, 0);
+ if (over_line && line) {
+ sp_gradient_context_add_stop_near_point(rc, line->item, rc->mousepoint_doc, 0);
ret = TRUE;
}
} else {