Code

Fix the "show temporary outlines for selected paths" preference.
authorKrzysztof Kosiński <tweenk.pl@gmail.com>
Tue, 8 Dec 2009 02:47:53 +0000 (03:47 +0100)
committerKrzysztof Kosiński <tweenk.pl@gmail.com>
Tue, 8 Dec 2009 02:47:53 +0000 (03:47 +0100)
src/ui/dialog/inkscape-preferences.cpp
src/ui/dialog/inkscape-preferences.h
src/ui/tool/node-tool.cpp

index 1d93eab6b0ba5cdfd9eb9d6493be827413744e63..b81c98b0f6da5145d7acb6c322a2a500187edc05 100644 (file)
@@ -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:"));
index 0fc1be21ee4baa4b9afb2b9617a5b799fac065d8..8ac63dd7cf70e8519eb0f49055d7b4cb98b85d5c 100644 (file)
@@ -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;
index 9103f066f9bc4e65ea7e6733652a6c1a6389ae9c..e310731bbf07162de3fda3fa9f1cecb8db612998 100644 (file)
@@ -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;