From 4756ffaebb8e495ae1b7513cb03837028f2c0a41 Mon Sep 17 00:00:00 2001 From: "Jon A. Cruz" Date: Thu, 5 Mar 2009 06:00:11 +0000 Subject: Add option to only flash paths for node tool when none is selected. Applies patch from bug #336490. (bzr r7420) --- src/node-context.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/node-context.cpp') diff --git a/src/node-context.cpp b/src/node-context.cpp index a8f6fcf97..33b4a53e0 100644 --- a/src/node-context.cpp +++ b/src/node-context.cpp @@ -236,7 +236,14 @@ sp_node_context_item_handler(SPEventContext *event_context, SPItem *item, GdkEve Inkscape::Preferences *prefs = Inkscape::Preferences::get(); if (prefs->getBool("/tools/nodes/pathflash_enabled")) { - guint timeout = prefs->getInt("/tools/nodes/pathflash_timeout", 500); + if (prefs->getBool("/tools/nodes/pathflash_unselected")) { + SPDesktop *desktop = event_context->desktop; + ShapeEditor* se = event_context->shape_editor; + Inkscape::Selection *selection = sp_desktop_selection (desktop); + if (se->has_nodepath() && selection->singleItem()) { + return ret; + } + } if (SP_IS_LPE_ITEM(item)) { Inkscape::LivePathEffect::Effect *lpe = sp_lpe_item_get_current_lpe(SP_LPE_ITEM(item)); if (lpe && (lpe->providesOwnFlashPaths() || @@ -246,6 +253,7 @@ sp_node_context_item_handler(SPEventContext *event_context, SPItem *item, GdkEve return ret; } } + guint timeout = prefs->getInt("/tools/nodes/pathflash_timeout", 500); sp_node_context_flash_path(event_context, item, timeout); } -- cgit v1.2.3