From 4767e5925e245a34965a1630d6eded906e64f348 Mon Sep 17 00:00:00 2001 From: stefan schippers Date: Fri, 26 Sep 2025 00:25:31 +0200 Subject: [PATCH] move procedure in different place (before MAIN in xschem.tcl) --- src/xschem.tcl | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/xschem.tcl b/src/xschem.tcl index 996ad9f9..8864b1b5 100644 --- a/src/xschem.tcl +++ b/src/xschem.tcl @@ -10064,6 +10064,14 @@ proc setup_tcp_bespice {} { return 1 } +## this proc must be called for any created entry widgets +proc entry_replace_selection {w} { + global text_replace_selection OS + if {$text_replace_selection && $OS != "Windows"} { + bind $w <> {if {[%W selection present]} {%W delete sel.first sel.last}} + } +} + ### ### MAIN PROGRAM ### @@ -10160,14 +10168,6 @@ if { [info exists has_x] && [info tclversion] >= 8.6 } { } } -## this proc must be called for any created entry widgets -proc entry_replace_selection {w} { - global text_replace_selection OS - if {$text_replace_selection && $OS != "Windows"} { - bind $w <> {if {[%W selection present]} {%W delete sel.first sel.last}} - } -} - # focus the schematic window if mouse goes over it, even if a dialog box is displayed, # without needing to click. This allows to move/zoom/pan the schematic while editing attributes. set_ne autofocus_mainwindow 0