From 3d7fbeecb8dc562a3a3cff855d1d380b1dcea928 Mon Sep 17 00:00:00 2001 From: gordan Date: Wed, 9 Nov 2005 09:21:22 +0000 Subject: [PATCH] Implement hidden key-binding for hiding pseudo links and nodes. Bug found by: Submitted by: Requested by: Reviewed by: Approved by: Obtained from: --- editor.tcl | 10 ++++++++++ initgui.tcl | 9 +++++++++ 2 files changed, 19 insertions(+) diff --git a/editor.tcl b/editor.tcl index 222bf5f..741dfd7 100755 --- a/editor.tcl +++ b/editor.tcl @@ -208,6 +208,11 @@ proc drawNode { node } { if { $showNodeLabels == 0} { .c itemconfigure $label -state hidden } + # XXX Invisible pseudo-node labels + global invisible + if { $invisible == 1 && [getNodeMirror $node] != "" } { + .c itemconfigure $label -state hidden + } return } @@ -222,6 +227,11 @@ proc drawLink { link } { -fill $defLinkColor -width $defLinkWidth \ -tags "link $link $lnode1 $lnode2" \ -arrow both] + # XXX Invisible pseudo-liks + global invisible + if { $invisible == 1 && [getLinkMirror $link] != "" } { + .c itemconfigure $link -state hidden + } .c raise $newlink background set newlink [.c create line 0 0 0 0 \ -fill white -width [expr $defLinkWidth * 3 ] \ diff --git a/initgui.tcl b/initgui.tcl index a019257..87c66af 100755 --- a/initgui.tcl +++ b/initgui.tcl @@ -363,6 +363,15 @@ menu .button3menu.moveto -tearoff 0 menu .button3menu.shell -tearoff 0 menu .button3menu.ethereal -tearoff 0 +# +# Invisible pseudo links +# +set invisible -1 +bind . { + global invisible + set invisible [expr $invisible * -1] + redrawAll +} # # Done with initialization, draw an empty canvas -- 2.39.5