From: joncruz Date: Thu, 5 Mar 2009 06:00:11 +0000 (+0000) Subject: Add option to only flash paths for node tool when none is selected. Applies patch... X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=bb6b9d6ac1aba68b1f6480c1dbd0c078074900c1;p=inkscape.git Add option to only flash paths for node tool when none is selected. Applies patch from bug #336490. --- 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); } diff --git a/src/preferences-skeleton.h b/src/preferences-skeleton.h index ae39a2272..16e147220 100644 --- a/src/preferences-skeleton.h +++ b/src/preferences-skeleton.h @@ -107,7 +107,7 @@ static char const preferences_skeleton[] = " \n" -" \n" +" \n" " \n" " \n" " \n" diff --git a/src/ui/dialog/inkscape-preferences.cpp b/src/ui/dialog/inkscape-preferences.cpp index fe7b1f7c1..d29ac37db 100644 --- a/src/ui/dialog/inkscape-preferences.cpp +++ b/src/ui/dialog/inkscape-preferences.cpp @@ -431,6 +431,8 @@ void InkscapePreferences::initPageTools() _page_node.add_line( false, _("Path outline color"), _t_node_pathoutline_color, "", _("Selects the color used for showing the path outline."), false); _t_node_pathflash_enabled.init ( _("Path outline flash on mouse-over"), "/tools/nodes/pathflash_enabled", false); _page_node.add_line( true, "", _t_node_pathflash_enabled, "", _("When hovering over a path, briefly flash its outline.")); + _t_node_pathflash_unselected.init ( _("Suppress path outline flash when one path selected"), "/tools/nodes/pathflash_unselected", false); + _page_node.add_line( true, "", _t_node_pathflash_unselected, "", _("If a path is selected, do not continue flashing path outlines.")); _t_node_pathflash_timeout.init("/tools/nodes/pathflash_timeout", 0, 10000.0, 100.0, 100.0, 1000.0, true, false); _page_node.add_line( false, _("Flash time"), _t_node_pathflash_timeout, "ms", _("Specifies how long the path outline will be visible after a mouse-over (in milliseconds). Specify 0 to have the outline shown until mouse leaves the path."), false); diff --git a/src/ui/dialog/inkscape-preferences.h b/src/ui/dialog/inkscape-preferences.h index ac3c96a88..a68303ab9 100644 --- a/src/ui/dialog/inkscape-preferences.h +++ b/src/ui/dialog/inkscape-preferences.h @@ -139,6 +139,7 @@ protected: _t_sel_cue_box, _t_bbox_visual, _t_bbox_geometric; PrefCheckButton _t_cvg_keep_objects, _t_cvg_convert_whole_groups; PrefCheckButton _t_node_pathflash_enabled; + PrefCheckButton _t_node_pathflash_unselected; PrefSpinButton _t_node_pathflash_timeout; PrefColorPicker _t_node_pathoutline_color;