summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9b0ca74)
raw | patch | inline | side by side (parent: 9b0ca74)
author | dvlierop2 <dvlierop2@users.sourceforge.net> | |
Tue, 31 Mar 2009 19:53:28 +0000 (19:53 +0000) | ||
committer | dvlierop2 <dvlierop2@users.sourceforge.net> | |
Tue, 31 Mar 2009 19:53:28 +0000 (19:53 +0000) |
src/event-context.cpp | patch | blob | history | |
src/knot.cpp | patch | blob | history | |
src/node-context.cpp | patch | blob | history |
diff --git a/src/event-context.cpp b/src/event-context.cpp
index 5b845388bce1c8bdd44fd7a226d237fdf5850463..e228497985db5fb1259178c0853bf1f37fa1548f 100644 (file)
--- a/src/event-context.cpp
+++ b/src/event-context.cpp
@@ -902,7 +902,10 @@ sp_event_context_root_handler(SPEventContext * event_context, GdkEvent * event)
sp_event_context_snap_delay_handler(event_context, NULL, NULL, (GdkEventMotion *)event, DelayedSnapEvent::EVENTCONTEXT_ROOT_HANDLER);
break;
case GDK_BUTTON_RELEASE:
- sp_event_context_snap_watchdog_callback(event_context->_delayed_snap_event); // If we have any pending snapping action, then invoke it now
+ if (event_context->_delayed_snap_event) {
+ // If we have any pending snapping action, then invoke it now
+ sp_event_context_snap_watchdog_callback(event_context->_delayed_snap_event);
+ }
break;
case GDK_BUTTON_PRESS:
case GDK_2BUTTON_PRESS:
@@ -940,7 +943,10 @@ sp_event_context_item_handler(SPEventContext * event_context, SPItem * item, Gdk
sp_event_context_snap_delay_handler(event_context, item, NULL, (GdkEventMotion *)event, DelayedSnapEvent::EVENTCONTEXT_ITEM_HANDLER);
break;
case GDK_BUTTON_RELEASE:
- sp_event_context_snap_watchdog_callback(event_context->_delayed_snap_event); // If we have any pending snapping action, then invoke it now
+ if (event_context->_delayed_snap_event) {
+ // If we have any pending snapping action, then invoke it now
+ sp_event_context_snap_watchdog_callback(event_context->_delayed_snap_event);
+ }
break;
/*case GDK_BUTTON_PRESS:
case GDK_2BUTTON_PRESS:
diff --git a/src/knot.cpp b/src/knot.cpp
index ae8a7f7c500c32aeb8516d99efa74fe0acda6c2b..5c821f9092e55611c2da307ed24d0bd941a6d976 100644 (file)
--- a/src/knot.cpp
+++ b/src/knot.cpp
@@ -332,7 +332,10 @@ static int sp_knot_handler(SPCanvasItem */*item*/, GdkEvent *event, SPKnot *knot
}
snap_delay_temporarily_active = false;
}
- sp_event_context_snap_watchdog_callback(knot->desktop->event_context->_delayed_snap_event);
+
+ if (knot->desktop->event_context->_delayed_snap_event) {
+ sp_event_context_snap_watchdog_callback(knot->desktop->event_context->_delayed_snap_event);
+ }
knot->pressure = 0;
if (transform_escaped) {
diff --git a/src/node-context.cpp b/src/node-context.cpp
index 44dbabcb0dbf059310b0002621f10148d8464c95..a28e0d6bcf4d4ee6591950d3a544cd6c0ce5bbef 100644 (file)
--- a/src/node-context.cpp
+++ b/src/node-context.cpp
nc->remove_flash_counter--;
}
+ sp_event_context_snap_window_open(event_context, false); // Just put the snap window open, bluntly. Will be closed when we have left the context
+
gint ret = FALSE;
switch (event->type) {
case GDK_BUTTON_PRESS:
if (!(event->button.state & GDK_SHIFT_MASK)) {
if (!nc->drag) {
if (se->has_nodepath() && selection->single() /* && item_over */) {
- sp_event_context_snap_window_open(event_context);
// save drag origin
bool over_stroke = se->is_over_stroke(Geom::Point(event->button.x, event->button.y), true);
//only dragging curves
}
desktop->updateNow();
}
- sp_event_context_snap_window_closed(event_context);
- break;
+ break;
case GDK_2BUTTON_PRESS:
//add a node
se->add_node_near_point();
nc->added_node = true;
- sp_event_context_snap_window_closed(event_context);
break;
default:
break;