summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDiederik van Lierop <mail@diedenrezi.nl>2009-04-12 20:00:42 +0000
committerdvlierop2 <dvlierop2@users.sourceforge.net>2009-04-12 20:00:42 +0000
commit86d70ead8eb7c975dd12a3549975b2964865c7f7 (patch)
tree42feeac53a6b556c17e9c24932d8031105afbcea /src
parentadd LPE recursive skeleton (experimental) (diff)
downloadinkscape-86d70ead8eb7c975dd12a3549975b2964865c7f7.tar.gz
inkscape-86d70ead8eb7c975dd12a3549975b2964865c7f7.zip
Fix two "snap window not opened" warnings
(bzr r7693)
Diffstat (limited to 'src')
-rw-r--r--src/gradient-context.cpp4
-rw-r--r--src/select-context.cpp6
-rw-r--r--src/snap.cpp6
3 files changed, 8 insertions, 8 deletions
diff --git a/src/gradient-context.cpp b/src/gradient-context.cpp
index 03c3c947c..643b63f79 100644
--- a/src/gradient-context.cpp
+++ b/src/gradient-context.cpp
@@ -216,8 +216,6 @@ static void sp_gradient_context_setup(SPEventContext *ec)
rc->selcon = new sigc::connection (selection->connectChanged( sigc::bind (sigc::ptr_fun(&gradient_selection_changed), rc)));
rc->subselcon = new sigc::connection (ec->desktop->connectToolSubselectionChanged(sigc::bind (sigc::ptr_fun(&gradient_subselection_changed), rc)));
gradient_selection_changed(selection, rc);
-
- sp_event_context_snap_window_open(ec);
}
void
@@ -555,7 +553,7 @@ sp_gradient_context_root_handler(SPEventContext *event_context, GdkEvent *event)
if (!(event->button.state & GDK_CONTROL_MASK))
event_context->item_to_select = sp_event_context_find_item (desktop, button_w, event->button.state & GDK_MOD1_MASK, TRUE);
- /* Snap center to nearest magnetic point */
+ sp_event_context_snap_window_open(event_context, false);
SnapManager &m = desktop->namedview->snap_manager;
m.setup(desktop);
m.freeSnapReturnByRef(Inkscape::SnapPreferences::SNAPPOINT_NODE, button_dt, Inkscape::SNAPSOURCE_HANDLE);
diff --git a/src/select-context.cpp b/src/select-context.cpp
index e30ef53d2..aedd3babc 100644
--- a/src/select-context.cpp
+++ b/src/select-context.cpp
@@ -499,8 +499,10 @@ sp_select_context_root_handler(SPEventContext *event_context, GdkEvent *event)
if (sc->button_press_ctrl || (sc->button_press_alt && !sc->button_press_shift && !selection->isEmpty())) {
// if it's not click and ctrl or alt was pressed (the latter with some selection
// but not with shift) we want to drag rather than rubberband
- sc->dragging = TRUE;
- sp_event_context_snap_window_open(event_context);
+ if (sc->dragging == FALSE) {
+ sp_event_context_snap_window_open(event_context);
+ }
+ sc->dragging = TRUE;
sp_canvas_force_full_redraw_after_interruptions(desktop->canvas, 5);
}
diff --git a/src/snap.cpp b/src/snap.cpp
index 392e1c075..9ca9b7838 100644
--- a/src/snap.cpp
+++ b/src/snap.cpp
@@ -162,7 +162,7 @@ Inkscape::SnappedPoint SnapManager::freeSnap(Inkscape::SnapPreferences::PointTyp
Geom::OptRect const &bbox_to_snap) const
{
if (_desktop->event_context && _desktop->event_context->_snap_window_open == false) {
- g_warning("context_snap_window_open has not been set to true by the current context. Please report this!");
+ g_warning("The current tool tries to snap, but it hasn't yet opened the snap window. Please report this!");
// When the context goes into dragging-mode, then Inkscape should call this: sp_event_context_snap_window_open(event_context);
}
@@ -297,7 +297,7 @@ Inkscape::SnappedPoint SnapManager::constrainedSnap(Inkscape::SnapPreferences::P
Geom::OptRect const &bbox_to_snap) const
{
if (_desktop->event_context && _desktop->event_context->_snap_window_open == false) {
- g_warning("context_snap_window_open has not been set to true by the current context. Please report this!");
+ g_warning("The current tool tries to snap, but it hasn't yet opened the snap window. Please report this!");
// When the context goes into dragging-mode, then Inkscape should call this: sp_event_context_snap_window_open(event_context);
}
@@ -335,7 +335,7 @@ void SnapManager::guideSnap(Geom::Point &p, Geom::Point const &guide_normal) con
// This method is used to snap a guide to nodes or to other guides, while dragging the guide around. Will not snap to grids!
if (_desktop->event_context && _desktop->event_context->_snap_window_open == false) {
- g_warning("context_snap_window_open has not been set to true by the current context. Please report this!");
+ g_warning("The current tool tries to snap, but it hasn't yet opened the snap window. Please report this!");
// When the context goes into dragging-mode, then Inkscape should call this: sp_event_context_snap_window_open(event_context);
}