diff options
Diffstat (limited to 'raisecords-plugin.tcl')
-rw-r--r-- | raisecords-plugin.tcl | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/raisecords-plugin.tcl b/raisecords-plugin.tcl new file mode 100644 index 0000000..8212d63 --- /dev/null +++ b/raisecords-plugin.tcl @@ -0,0 +1,15 @@ +# this script makes it so that the cords are hidden when not in edit mode + +proc set_cords_by_editmode {mytoplevel eventname} { + if {$mytoplevel eq ".pdwindow"} {return} + if { ! [winfo exists $mytoplevel] } {return} + set tkcanvas [tkcanvas_name $mytoplevel] + if {$::editmode($mytoplevel) == 1} { + $tkcanvas raise cord + } else { + $tkcanvas lower cord + } +} + +bind PatchWindow <<EditMode>> {+set_cords_by_editmode %W editmode} +bind PatchWindow <<Loaded>> {+set_cords_by_editmode %W loaded} |