From ed8117784e2f11abe4acd73ae3deeae926b4f153 Mon Sep 17 00:00:00 2001 From: Tim Edwards Date: Fri, 14 Feb 2020 09:36:30 -0500 Subject: [PATCH] Corrected three annoying errors: (1) Select net method had been changed to ignore labels below the top level of hierarchy. This turned out to be a bad idea. However, the original behavior was problematic due to confusion over what part of the hierarchy the labels were in. The new behavior prefixes each label with the cell hierarchy, eliminating both problems. (2) Corrected the problem where the attachment box for rendered labels is not displayed if the label name is not in the viewing area. (3) Corrected the problem where redirection of input from the layout window to the console window with the ":" command gets inadvertently canceled; this turned out to be due to a missing "*bypass" in front of the command that finds the output scale to display the pointer coordinates, and this was happening whenever the mouse was moved while typing in a command. --- database/DBcellsrch.c | 5 ++++- dbwind/DBWdisplay.c | 2 +- tcltk/wrapper.tcl | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/database/DBcellsrch.c b/database/DBcellsrch.c index a960bf2e..d3eaa667 100644 --- a/database/DBcellsrch.c +++ b/database/DBcellsrch.c @@ -581,8 +581,11 @@ DBTreeSrLabels(scx, mask, xMask, tpath, flags, func, cdarg) else is_touching = GEO_TOUCH(&lab->lab_rect, r); } - if (!is_touching && (flags & TF_LABEL_DISPLAY) && (lab->lab_font >= 0)) + if (!is_touching && (flags & TF_LABEL_DISPLAY) && lab->lab_font >= 0) + { + /* Check against bounds of the rendered label text */ is_touching = GEO_TOUCH(&lab->lab_bbox, r); + } if (is_touching && TTMaskHasType(mask, lab->lab_type)) if ((*func)(scx, lab, tpath, cdarg)) diff --git a/dbwind/DBWdisplay.c b/dbwind/DBWdisplay.c index 8ea1b3bd..0ccb80ea 100644 --- a/dbwind/DBWdisplay.c +++ b/dbwind/DBWdisplay.c @@ -418,7 +418,7 @@ DBWredisplay(w, rootArea, clipArea) /* Set style information beforehand */ GrSetStuff(STYLE_LABEL); (void) DBTreeSrLabels(&scontext, &DBAllTypeBits, bitMask, - (TerminalPath *) NULL, TF_LABEL_DISPLAY, + (TerminalPath *) NULL, TF_LABEL_DISPLAY | TF_LABEL_ATTACH, dbwLabelFunc, (ClientData) NULL); GrClipTo(&rootClip); } diff --git a/tcltk/wrapper.tcl b/tcltk/wrapper.tcl index 563778d5..271d2cd6 100644 --- a/tcltk/wrapper.tcl +++ b/tcltk/wrapper.tcl @@ -629,7 +629,7 @@ proc magic::cursorview {win} { return } set framename [winfo parent $win] - if {[catch {set cr [cif scale out]}]} {return} + if {[catch {set cr [*bypass cif scale out]}]} {return} if {$cr == 0} {return} set olst [${win} cursor internal]