From d3541bde193ed2007aebdbf57526f61417378c75 Mon Sep 17 00:00:00 2001 From: zebra Date: Tue, 8 Aug 2023 14:28:51 +0200 Subject: [PATCH] show rack list when _cc is present and rack is 'no' --- tcl/seacom.tcl | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tcl/seacom.tcl b/tcl/seacom.tcl index e33971a..7d3b2da 100644 --- a/tcl/seacom.tcl +++ b/tcl/seacom.tcl @@ -2109,15 +2109,20 @@ proc ObjState {} { lappend list $obj } set canNotConnect 0 + set showRackList 0 + set rack [silent no result device rack] foreach obj $list { if {$obj eq "_cc"} { set canNotConnect [showStatus _cc 1] + if {$canNotConnect || $rack eq "no"} { + set showRackList 1 + } } else { showStatus $obj 1 } } if {[result device name] eq "none"} { - Group rack "choose rack" + set showRackList 1 } elseif {$canNotConnect} { Style warning if {[silent no result device rack] eq "other"} { @@ -2136,6 +2141,8 @@ proc ObjState {} { Style hotwarning Label "please select rack (rack number as labelled on the top of the rack)" } + } + if {$showRackList} { Group rack "choose rack" } }