Revision: 75483
          http://sourceforge.net/p/brlcad/code/75483
Author:   starseeker
Date:     2020-04-21 10:56:30 +0000 (Tue, 21 Apr 2020)
Log Message:
-----------
Cherrypick r75472 - Have overlap checker display only region names, with 
fullpath copy to clipboard available via right-click menu

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 10:55:11 UTC (rev 75482)
+++ brlcad/branches/RELEASE     2020-04-21 10:56:30 UTC (rev 75483)

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-75471
\ 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
\ 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 
10:55:11 UTC (rev 75482)
+++ brlcad/branches/RELEASE/src/tclscripts/checker/check.tcl    2020-04-21 
10:56:30 UTC (rev 75483)
@@ -70,6 +70,8 @@
        variable _ol_dir ""
        variable _ol_prefix ""
 
+       variable _fullPath
+
        variable _ck
        variable _status
        variable _commandText
@@ -122,6 +124,7 @@
        method changeMarkOnSelection {tag_cmd}
        method markSelection {}
        method unmarkSelection {}
+       method copySelection {}
 
        method handleProgressButton {}
        method handleCheckListSelect {}
@@ -176,6 +179,7 @@
     set _abort false
     set _doingSubtraction false
     set _drew {}
+    array set _fullPath {}
 
     set _subLeftCommand "puts subtract the left"
     set _subRightCommand "puts subtract the right"
@@ -301,10 +305,10 @@
     set _ck $itk_component(checkList)
     set _status $itk_component(headerLabelStatus)
 
-    $_ck column ID -anchor center -width 100 -minwidth 50
-    $_ck column Left -anchor w -width 200 -minwidth 100
-    $_ck column Right -anchor w -width 200 -minwidth 100
-    $_ck column Size -anchor e -width 100 -minwidth 50
+    $_ck column ID -anchor center -stretch false
+    $_ck column Left -anchor w
+    $_ck column Right -anchor w
+    $_ck column Size -anchor e -stretch false
     $_ck heading ID -image _arrowDown -anchor w -command [list $this sortBy ID 
1]
     $_ck heading Left -text "Left" -image _arrowOff -anchor center -command 
[list $this sortBy Left 0]
     $_ck heading Right -text "Right" -image _arrowOff -anchor center -command 
[list $this sortBy Right 0]
@@ -314,6 +318,7 @@
     $itk_component(checkMenu) configure -font $font
     $itk_component(checkMenu) add command -label "Mark Selected" -command 
[code $this markSelection]
     $itk_component(checkMenu) add command -label "Unmark Selected" -command 
[code $this unmarkSelection]
+    $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
@@ -415,6 +420,7 @@
        if {[regexp "$comment_or_empty" "$line"]} {
            continue
        }
+       incr count
        set left [lindex $line 0]
        set right [lindex $line 1]
        set size [lindex $line 2]
@@ -440,6 +446,10 @@
            set right $tmp
        }
 
+       set _fullPath($count) [list $left $right]
+       set left [file tail $left]
+       set right [file tail $right]
+
        set len_left [font measure $font $left]
        set len_right [font measure $font $right]
        set len_size [font measure $font $size]
@@ -454,7 +464,6 @@
            set width_size $len_size
        }
 
-       incr count
        if {$count % 2 == 0} {
            set tag "even"
        } else {
@@ -762,6 +771,18 @@
     $this changeMarkOnSelection "remove"
 }
 
+body GeometryChecker::copySelection {} {
+    set paths {}
+    set sset [$_ck selection]
+    foreach item $sset {
+       set fullpaths $_fullPath([$_ck set $item "ID"])
+
+       lappend paths {*}$fullpaths
+    }
+    clipboard clear
+    clipboard append $paths
+}
+
 body GeometryChecker::subtractItemRightFromLeft {left right} {
     set _commandText "Subtracting ($right) from ($left)"
     $_overlapCallback $left $right $subtractFirst

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