From 6520245b19ffa80f32384a9e187e21d3e0272726 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Krzysztof=20Kosi=C5=84ski?= Date: Tue, 8 Dec 2009 03:47:53 +0100 Subject: [PATCH] Fix the "show temporary outlines for selected paths" preference. --- src/ui/dialog/inkscape-preferences.cpp | 12 +++++++----- src/ui/dialog/inkscape-preferences.h | 3 ++- src/ui/tool/node-tool.cpp | 4 +--- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/ui/dialog/inkscape-preferences.cpp b/src/ui/dialog/inkscape-preferences.cpp index 1d93eab6b..b81c98b0f 100644 --- a/src/ui/dialog/inkscape-preferences.cpp +++ b/src/ui/dialog/inkscape-preferences.cpp @@ -435,13 +435,15 @@ void InkscapePreferences::initPageTools() AddGradientCheckbox(_page_node, "/tools/nodes", true); _page_node.add_group_header( _("Path outline:")); _t_node_pathoutline_color.init(_("Path outline color"), "/tools/nodes/highlight_color", 0xff0000ff); - _page_node.add_line( false, _("Path outline color"), _t_node_pathoutline_color, "", _("Selects the color used for showing the path outline."), false); - _t_node_show_path_direction.init(_("Show path direction"), "/tools/nodes/show_path_direction", false); - _page_node.add_line( true, "", _t_node_show_path_direction, "", _("Visualize the direction of selected paths by drawing small arrows in the middle of each segment.")); + _page_node.add_line( false, "", _t_node_pathoutline_color, "", _("Selects the color used for showing the path outline."), false); + _t_node_show_outline.init(_("Always show outline"), "/tools/nodes/show_outline", false); + _page_node.add_line( true, "", _t_node_show_outline, "", _("Show outlines for all paths, not only invisible paths")); + _t_node_show_path_direction.init(_("Show path direction on outlines"), "/tools/nodes/show_path_direction", false); + _page_node.add_line( true, "", _t_node_show_path_direction, "", _("Visualize the direction of selected paths by drawing small arrows in the middle of each outline segment")); _t_node_pathflash_enabled.init ( _("Show temporary path outline"), "/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 ( _("Show temporary outline for selected paths"), "/tools/nodes/pathflash_unselected", false); - _page_node.add_line( true, "", _t_node_pathflash_unselected, "", _("Show temporary outline even when a path is selected for editing")); + _t_node_pathflash_selected.init ( _("Show temporary outline for selected paths"), "/tools/nodes/pathflash_selected", false); + _page_node.add_line( true, "", _t_node_pathflash_selected, "", _("Show temporary outline even when a path is selected for editing")); _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); _page_node.add_group_header(_("Transform Handles:")); diff --git a/src/ui/dialog/inkscape-preferences.h b/src/ui/dialog/inkscape-preferences.h index 0fc1be21e..8ac63dd7c 100644 --- a/src/ui/dialog/inkscape-preferences.h +++ b/src/ui/dialog/inkscape-preferences.h @@ -140,8 +140,9 @@ protected: PrefRadioButton _t_sel_trans_obj, _t_sel_trans_outl, _t_sel_cue_none, _t_sel_cue_mark, _t_sel_cue_box, _t_bbox_visual, _t_bbox_geometric; PrefCheckButton _t_cvg_keep_objects, _t_cvg_convert_whole_groups; + PrefCheckButton _t_node_show_outline; PrefCheckButton _t_node_pathflash_enabled; - PrefCheckButton _t_node_pathflash_unselected; + PrefCheckButton _t_node_pathflash_selected; PrefSpinButton _t_node_pathflash_timeout; PrefCheckButton _t_node_show_path_direction; PrefCheckButton _t_node_show_transform_handles; diff --git a/src/ui/tool/node-tool.cpp b/src/ui/tool/node-tool.cpp index 9103f066f..e310731bb 100644 --- a/src/ui/tool/node-tool.cpp +++ b/src/ui/tool/node-tool.cpp @@ -395,12 +395,10 @@ gint ink_node_tool_root_handler(SPEventContext *event_context, GdkEvent *event) case GDK_MOTION_NOTIFY: // create outline if (prefs->getBool("/tools/nodes/pathflash_enabled")) { - if (prefs->getBool("/tools/nodes/pathflash_unselected") && !nt->_multipath->empty()) - break; - SPItem *over_item = sp_event_context_find_item (desktop, event_point(event->button), FALSE, TRUE); if (over_item == nt->flashed_item) break; + if (!prefs->getBool("/tools/nodes/pathflash_selected") && selection->includes(over_item)) break; if (nt->flash_tempitem) { desktop->remove_temporary_canvasitem(nt->flash_tempitem); nt->flash_tempitem = NULL; -- 2.30.2