summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJon A. Cruz <jon@joncruz.org>2009-03-05 06:00:11 +0000
committerjoncruz <joncruz@users.sourceforge.net>2009-03-05 06:00:11 +0000
commit4756ffaebb8e495ae1b7513cb03837028f2c0a41 (patch)
treec6f4c4fce9d86b0fff9256f1f605aa3e06c6c12c /src
parentAdd layers dialog to top toolbar. Applies patch from bug #336519. (diff)
downloadinkscape-4756ffaebb8e495ae1b7513cb03837028f2c0a41.tar.gz
inkscape-4756ffaebb8e495ae1b7513cb03837028f2c0a41.zip
Add option to only flash paths for node tool when none is selected. Applies patch from bug #336490.
(bzr r7420)
Diffstat (limited to 'src')
-rw-r--r--src/node-context.cpp10
-rw-r--r--src/preferences-skeleton.h2
-rw-r--r--src/ui/dialog/inkscape-preferences.cpp2
-rw-r--r--src/ui/dialog/inkscape-preferences.h1
4 files changed, 13 insertions, 2 deletions
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[] =
" <eventcontext id=\"text\" usecurrent=\"0\" gradientdrag=\"1\"\n"
" font_sample=\"AaBbCcIiPpQq12369$\342\202\254\302\242?.;/()\"\n"
" style=\"fill:black;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans;font-style:normal;font-weight:normal;font-size:40px;\" selcue=\"1\"/>\n"
-" <eventcontext id=\"nodes\" selcue=\"1\" gradientdrag=\"1\" highlight_color=\"4278190335\" pathflash_enabled=\"1\" pathflash_timeout=\"500\" show_handles=\"1\" show_helperpath=\"0\" sculpting_profile=\"1\" />\n"
+" <eventcontext id=\"nodes\" selcue=\"1\" gradientdrag=\"1\" highlight_color=\"4278190335\" pathflash_enabled=\"1\" pathflash_unselected=\"0\" pathflash_timeout=\"500\" show_handles=\"1\" show_helperpath=\"0\" sculpting_profile=\"1\" />\n"
" <eventcontext id=\"tweak\" selcue=\"0\" gradientdrag=\"0\" show_handles=\"0\" width=\"0.2\" force=\"0.2\" fidelity=\"0.5\" usepressure=\"1\" style=\"fill:red;stroke:none;\" usecurrent=\"0\"/>\n"
" <eventcontext id=\"gradient\" selcue=\"1\"/>\n"
" <eventcontext id=\"zoom\" selcue=\"1\" gradientdrag=\"0\"/>\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;