Revision: 75497
          http://sourceforge.net/p/brlcad/code/75497
Author:   starseeker
Date:     2020-04-21 16:59:05 +0000 (Tue, 21 Apr 2020)
Log Message:
-----------
Cherrypick r75495 - Add a checkbutton to the overlap checker to toggle fullpath 
display

Modified Paths:
--------------
    brlcad/branches/RELEASE/src/tclscripts/checker/check.tcl

Property Changed:
----------------
    brlcad/branches/RELEASE/

Index: brlcad/branches/RELEASE
===================================================================
--- brlcad/branches/RELEASE     2020-04-21 16:58:24 UTC (rev 75496)
+++ brlcad/branches/RELEASE     2020-04-21 16:59:05 UTC (rev 75497)

Property changes on: brlcad/branches/RELEASE
___________________________________________________________________
Modified: svn:mergeinfo
## -6,4 +6,4 ##
 /brlcad/branches/opencl:65867-66137
 /brlcad/branches/osg:62110-62113
 /brlcad/branches/prep-cache:68236-68933
-/brlcad/trunk:36844-37285,37571-38764,38777-38845,41559-43155,43159-43908,44241-44324,44326-44385,44710-45373,45377,45379-47342,47370-68122,68125-74976,74981,74991,75056,75325,75375,75377-75378,75387,75470-75472,75477,75492
\ No newline at end of property
+/brlcad/trunk:36844-37285,37571-38764,38777-38845,41559-43155,43159-43908,44241-44324,44326-44385,44710-45373,45377,45379-47342,47370-68122,68125-74976,74981,74991,75056,75325,75375,75377-75378,75387,75470-75472,75477,75492,75495
\ No newline at end of property
Modified: brlcad/branches/RELEASE/src/tclscripts/checker/check.tcl
===================================================================
--- brlcad/branches/RELEASE/src/tclscripts/checker/check.tcl    2020-04-21 
16:58:24 UTC (rev 75496)
+++ brlcad/branches/RELEASE/src/tclscripts/checker/check.tcl    2020-04-21 
16:59:05 UTC (rev 75497)
@@ -46,6 +46,7 @@
 
        method loadOverlaps { args } {}
        method sortBy { col direction } {}
+       method togglePathDisplay {} {}
 
        method goPrev {} {}
        method goNext {} {}
@@ -71,6 +72,7 @@
        variable _ol_prefix ""
 
        variable _fullPath
+       variable _fullPathHidden
 
        variable _ck
        variable _status
@@ -227,6 +229,13 @@
     itk_component add headerLabelStatus {
        ttk::label $itk_component(headerFrame).headerLabelStatus -text "Data 
Not Yet Loaded" -padding 2
     } {}
+    itk_component add fullPathButton {
+       ttk::checkbutton $itk_component(headerFrame).fullPathDisplayCheckButton 
\
+       -text "Hide Full Path" \
+       -variable [scope _fullPathHidden] \
+       -command [code $this togglePathDisplay]
+    } {}
+    set _fullPathHidden 1
 
     itk_component add checkFrame {
        ttk::frame $itk_interior.checkFrame -padding 2 
@@ -321,7 +330,9 @@
     $itk_component(checkMenu) add command -label "Copy Fullpaths" -command 
[code $this copySelection]
 
     pack $itk_component(headerFrame) -side top -fill both
-    pack $itk_component(headerLabelStatus) -side left -anchor w
+    grid $itk_component(headerLabelStatus) $itk_component(fullPathButton) 
-sticky nw
+    grid configure $itk_component(fullPathButton) -sticky ne
+    grid columnconfigure $itk_component(headerFrame) 0 -weight 1
 
     pack $itk_component(checkFrame) -expand true -fill both -anchor center
     pack $itk_component(checkFrame).checkScroll -side right -fill y 
@@ -602,7 +613,29 @@
     set _lastSort "$column $direction"
 }
 
+body GeometryChecker::togglePathDisplay {} {
+    if {$_fullPathHidden} {
+       foreach id [$_ck children {}] {
+           set fullpaths $_fullPath([$_ck set $id "ID"])
+           set leftPath [lindex $fullpaths 0]
+           set rightPath [lindex $fullpaths 1]
 
+           $_ck set $id "Left" [file tail $leftPath]
+           $_ck set $id "Right" [file tail $rightPath]
+       }
+    } else {
+       foreach id [$_ck children {}] {
+           set fullpaths $_fullPath([$_ck set $id "ID"])
+           set leftPath [lindex $fullpaths 0]
+           set rightPath [lindex $fullpaths 1]
+
+           $_ck set $id "Left" $leftPath
+           $_ck set $id "Right" $rightPath
+       }
+    }
+}
+
+
 # goPrev
 #
 # select the previous node

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.



_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to