Revision: 38925
http://brlcad.svn.sourceforge.net/brlcad/?rev=38925&view=rev
Author: bob1961
Date: 2010-04-30 19:37:09 +0000 (Fri, 30 Apr 2010)
Log Message:
-----------
Cleaned out unnecessary checks for the existence of itk_component(ged).
Modified Paths:
--------------
brlcad/trunk/src/tclscripts/archer/Archer.tcl
brlcad/trunk/src/tclscripts/archer/ArcherCore.tcl
Modified: brlcad/trunk/src/tclscripts/archer/Archer.tcl
===================================================================
--- brlcad/trunk/src/tclscripts/archer/Archer.tcl 2010-04-30 18:14:11 UTC
(rev 38924)
+++ brlcad/trunk/src/tclscripts/archer/Archer.tcl 2010-04-30 19:37:09 UTC
(rev 38925)
@@ -784,123 +784,121 @@
error "importFg4Sections: wlist is missing the WizardTop key and its
corresponding value"
}
- if {[info exists itk_component(ged)]} {
- SetWaitCursor $this
- set savedUnits [$itk_component(ged) units -s]
- $itk_component(ged) units in
- $itk_component(ged) configure -autoViewEnable 0
- $itk_component(ged) detachObservers
+ SetWaitCursor $this
+ set savedUnits [$itk_component(ged) units -s]
+ $itk_component(ged) units in
+ $itk_component(ged) configure -autoViewEnable 0
+ $itk_component(ged) detachObservers
- set pname ""
- set firstName ""
- set lastName ""
- foreach section $slist {
- set pname [lindex $section 0]
- set sdata [lindex $section 1]
- set attrList [lrange $section 2 end]
+ set pname ""
+ set firstName ""
+ set lastName ""
+ foreach section $slist {
+ set pname [lindex $section 0]
+ set sdata [lindex $section 1]
+ set attrList [lrange $section 2 end]
- set names [split $pname "/"]
- set firstName [lindex $names 0]
- set lastName [lindex $names end]
- set gnames [lrange $names 0 end-1]
+ set names [split $pname "/"]
+ set firstName [lindex $names 0]
+ set lastName [lindex $names end]
+ set gnames [lrange $names 0 end-1]
- if {[regexp {(.*\.)r([0-9]*)$} $lastName all s1 s2]} {
- set regionName $lastName
- set solidName $s1\s$s2
- } else {
- set regionName "$lastName\.r"
- set solidName "$lastName\.s"
- }
+ if {[regexp {(.*\.)r([0-9]*)$} $lastName all s1 s2]} {
+ set regionName $lastName
+ set solidName $s1\s$s2
+ } else {
+ set regionName "$lastName\.r"
+ set solidName "$lastName\.s"
+ }
- if {![catch {$itk_component(ged) get_type $solidName} ret]} {
- #$itk_component(ged) attachObservers
- $itk_component(ged) units $savedUnits
- error "importFg4Sections: $solidName already exists!"
- }
+ if {![catch {$itk_component(ged) get_type $solidName} ret]} {
+ #$itk_component(ged) attachObservers
+ $itk_component(ged) units $savedUnits
+ error "importFg4Sections: $solidName already exists!"
+ }
- if {[catch {$itk_component(ged) importFg4Section $solidName $sdata}
ret]} {
- #$itk_component(ged) attachObservers
- $itk_component(ged) units $savedUnits
- error "importFg4Sections: $ret"
- }
+ if {[catch {$itk_component(ged) importFg4Section $solidName $sdata}
ret]} {
+ #$itk_component(ged) attachObservers
+ $itk_component(ged) units $savedUnits
+ error "importFg4Sections: $ret"
+ }
- eval $itk_component(ged) otranslate $solidName $delta
+ eval $itk_component(ged) otranslate $solidName $delta
- # Add to the region
- $itk_component(ged) r $regionName u $solidName
+ # Add to the region
+ $itk_component(ged) r $regionName u $solidName
- if {$firstName == $lastName} {
- continue
- }
+ if {$firstName == $lastName} {
+ continue
+ }
- # reverse the list
- set reversedGnames {}
- foreach item $gnames {
- set reversedGnames [linsert $reversedGnames 0 $item]
- }
+ # reverse the list
+ set reversedGnames {}
+ foreach item $gnames {
+ set reversedGnames [linsert $reversedGnames 0 $item]
+ }
- set gmember $regionName
- foreach gname $reversedGnames {
- if {[catch {$itk_component(ged) get_type $gname} ret]} {
- $itk_component(ged) g $gname $gmember
- } else {
- if {[catch {gedCmd get $gname tree} tree]} {
- #$itk_component(ged) attachObservers
- $itk_component(ged) units $savedUnits
- error "importFg4Sections: $gname is not a group!"
- }
+ set gmember $regionName
+ foreach gname $reversedGnames {
+ if {[catch {$itk_component(ged) get_type $gname} ret]} {
+ $itk_component(ged) g $gname $gmember
+ } else {
+ if {[catch {gedCmd get $gname tree} tree]} {
+ #$itk_component(ged) attachObservers
+ $itk_component(ged) units $savedUnits
+ error "importFg4Sections: $gname is not a group!"
+ }
- # Add gmember only if its not already there
- regsub -all {(\{[ul] )|([{}]+)} $tree " " tmembers
- if {[lsearch $tmembers $gmember] == -1} {
- $itk_component(ged) g $gname $gmember
- }
+ # Add gmember only if its not already there
+ regsub -all {(\{[ul] )|([{}]+)} $tree " " tmembers
+ if {[lsearch $tmembers $gmember] == -1} {
+ $itk_component(ged) g $gname $gmember
}
+ }
- # Add WizardTop attribute
- $itk_component(ged) attr set $gname WizardTop $wizTop
+ # Add WizardTop attribute
+ $itk_component(ged) attr set $gname WizardTop $wizTop
- set gmember $gname
- }
+ set gmember $gname
+ }
- # Add WizardTop attribute to the region and its solid
- $itk_component(ged) attr set $regionName WizardTop $wizTop
- $itk_component(ged) attr set $solidName WizardTop $wizTop
+ # Add WizardTop attribute to the region and its solid
+ $itk_component(ged) attr set $regionName WizardTop $wizTop
+ $itk_component(ged) attr set $solidName WizardTop $wizTop
- # Add wizard attributes
- #foreach {key val} $wlist {
- #$itk_component(ged) attr set $wizTop $key $val
- #}
+ # Add wizard attributes
+ #foreach {key val} $wlist {
+ #$itk_component(ged) attr set $wizTop $key $val
+ #}
- # Add other attributes that are specific to this region
- foreach {key val} $attrList {
- $itk_component(ged) attr set $regionName $key $val
- }
+ # Add other attributes that are specific to this region
+ foreach {key val} $attrList {
+ $itk_component(ged) attr set $regionName $key $val
+ }
- if {[catch {$itk_component(ged) attr get $regionName transparency}
tr]} {
+ if {[catch {$itk_component(ged) attr get $regionName transparency} tr]}
{
+ set tr 1.0
+ } else {
+ if {![string is double $tr] || $tr < 0.0 || 1.0 < $tr} {
set tr 1.0
- } else {
- if {![string is double $tr] || $tr < 0.0 || 1.0 < $tr} {
- set tr 1.0
- }
}
+ }
- if {[catch {$itk_component(ged) attr get $regionName vmode} vmode]}
{
- set vmode 0
- } else {
- switch -- $vmode {
- "shaded" {
- set vmode 2
- }
- default {
- set vmode 0
- }
+ if {[catch {$itk_component(ged) attr get $regionName vmode} vmode]} {
+ set vmode 0
+ } else {
+ switch -- $vmode {
+ "shaded" {
+ set vmode 2
}
+ default {
+ set vmode 0
+ }
}
-
- render $pname\.r $vmode $tr 0 0
}
+ render $pname\.r $vmode $tr 0 0
+
# Add wizard attributes
foreach {key val} $wlist {
$itk_component(ged) attr set $wizTop $key $val
@@ -1858,19 +1856,16 @@
set mHPaneFraction1 100
set mHPaneFraction2 0
}
- if {[info exists itk_component(ged)]} {
- if {!$mSeparateCommandWindow} {
- set mHPaneFraction1 80
- set mHPaneFraction2 20
- } else {
- set xy [winfo pointerxy [namespace tail $this]]
- wm geometry $itk_component(sepcmdT) "+[lindex $xy 0]+[lindex
$xy 1]"
- }
- after idle "$itk_component(cmd) configure -cmd_prefix \"[namespace
tail $this] cmd\""
+ if {!$mSeparateCommandWindow} {
+ set mHPaneFraction1 80
+ set mHPaneFraction2 20
} else {
- after idle "$itk_component(cmd) configure -cmd_prefix \"[namespace
tail $this] cmd\""
+ set xy [winfo pointerxy [namespace tail $this]]
+ wm geometry $itk_component(sepcmdT) "+[lindex $xy 0]+[lindex $xy 1]"
}
+
+ after idle "$itk_component(cmd) configure -cmd_prefix \"[namespace tail
$this] cmd\""
} else {
if {$_mflag} {
buildEmbeddedMenubar
@@ -2067,10 +2062,6 @@
}
::itcl::body Archer::gedWrapper2 {cmd oindex pindex eflag hflag sflag tflag
args} {
- if {![info exists itk_component(ged)]} {
- return
- }
-
SetWaitCursor $this
if {$eflag} {
@@ -2443,11 +2434,7 @@
::itcl::body Archer::initDefaultBindings {{_comp ""}} {
if {$_comp == ""} {
- if {[info exists itk_component(ged)]} {
- set _comp $itk_component(ged)
- } else {
- return
- }
+ set _comp $itk_component(ged)
}
ArcherCore::initDefaultBindings $_comp
@@ -5715,10 +5702,6 @@
::itcl::body Archer::initEdit {{_initEditMode 1}} {
- if {![info exists itk_component(ged)]} {
- return
- }
-
set mSelectedObjType [gedCmd get_type $mSelectedObj]
if {$mSelectedObjType != "bot"} {
@@ -5888,10 +5871,6 @@
################################### Object Edit via Mouse Section
###################################
::itcl::body Archer::beginObjRotate {} {
- if {![info exists itk_component(ged)]} {
- return
- }
-
set obj $mSelectedObjPath
if {$obj == ""} {
@@ -5924,10 +5903,6 @@
}
::itcl::body Archer::beginObjScale {} {
- if {![info exists itk_component(ged)]} {
- return
- }
-
set obj $mSelectedObjPath
if {$obj == ""} {
@@ -5956,10 +5931,6 @@
}
::itcl::body Archer::beginObjTranslate {} {
- if {![info exists itk_component(ged)]} {
- return
- }
-
set obj $mSelectedObjPath
if {$obj == ""} {
@@ -5989,10 +5960,6 @@
}
::itcl::body Archer::beginObjCenter {} {
- if {![info exists itk_component(ged)]} {
- return
- }
-
set obj $mSelectedObjPath
if {$obj == ""} {
@@ -6016,10 +5983,6 @@
}
::itcl::body Archer::endObjCenter {_obj} {
- if {![info exists itk_component(ged)]} {
- return
- }
-
updateObjSave
initEdit 0
@@ -6028,10 +5991,6 @@
}
::itcl::body Archer::endObjRotate {dname obj} {
- if {![info exists itk_component(ged)]} {
- return
- }
-
$itk_component(ged) pane_idle_mode $dname
updateObjSave
initEdit 0
@@ -6043,10 +6002,6 @@
}
::itcl::body Archer::endObjScale {dname obj} {
- if {![info exists itk_component(ged)]} {
- return
- }
-
$itk_component(ged) pane_idle_mode $dname
updateObjSave
initEdit 0
@@ -6058,18 +6013,9 @@
}
::itcl::body Archer::endObjTranslate {_dm _obj _mx _my} {
- if {![info exists itk_component(ged)]} {
- return
- }
-
$itk_component(ged) pane_idle_mode $_dm
handleObjCenter $_dm $_obj $_mx $_my
endObjCenter $_obj
-
-# $itk_component(ged) pane_idle_mode $_dm
-# updateObjSave
-# initEdit 0
-
}
::itcl::body Archer::handleObjCenter {_dm _obj _mx _my} {
@@ -6087,7 +6033,6 @@
set vx [lindex $vl 0]
set vy [lindex $vl 1]
set vcenter [list $vx $vy [lindex $ovcenter 2]]
-# set vcenter [list [lindex $vcenter 0] [lindex $vcenter 1] [lindex
$ovcenter 2]]
set ocenter [vscale [eval gedCmd pane_v2m_point $_dm $vcenter] [gedCmd
base2local]]
@@ -6551,10 +6496,6 @@
}
::itcl::body Archer::initDbAttrView {name} {
- if {![info exists itk_component(ged)]} {
- return
- }
-
catch {pack forget $itk_component(dbAttrView)}
catch {pack forget $itk_component(objViewToolbar)}
catch {pack forget $itk_component(objAttrView)}
@@ -6729,10 +6670,6 @@
}
::itcl::body Archer::initObjAttrView {} {
- if {![info exists itk_component(ged)]} {
- return
- }
-
if {$mSelectedObj == ""} {
return
}
@@ -6774,10 +6711,6 @@
}
::itcl::body Archer::initObjEditView {} {
- if {![info exists itk_component(ged)]} {
- return
- }
-
if {$mSelectedObj == ""} {
return
}
@@ -6824,10 +6757,8 @@
initEdit
- if {[info exists itk_component(ged)]} {
- pack $itk_component(objViewToolbar) -expand no -fill x -anchor n
- pack $itk_component(objEditView) -expand yes -fill both -anchor n
- }
+ pack $itk_component(objViewToolbar) -expand no -fill x -anchor n
+ pack $itk_component(objEditView) -expand yes -fill both -anchor n
} else {
if {[pluginQuery $mWizardClass] == -1} {
# the wizard plugin has not been loaded
@@ -7306,10 +7237,6 @@
}
::itcl::body Archer::pluginGetMinAllowableRid {} {
- if {![info exists itk_component(ged)]} {
- return 0
- }
-
set maxRid 0
foreach {rid rname} [$itk_component(ged) rmap] {
if {$maxRid < $rid} {
@@ -7588,10 +7515,8 @@
pack $itk_component(advancedTabs) -fill both -expand yes
$itk_component(hpane) fraction $mHPaneFraction1 $mHPaneFraction2
- if {[info exists itk_component(ged)]} {
- activateMenusEtc
- updateSaveMode
- }
+ activateMenusEtc
+ updateSaveMode
}
if {$mEnableBigEPref != $mEnableBigE} {
@@ -7715,33 +7640,31 @@
if {$mModelAxesSizePref != $mModelAxesSize} {
set mModelAxesSize $mModelAxesSizePref
- if {[info exists itk_component(ged)]} {
- switch -- $mModelAxesSize {
- "Small" {
- gedCmd configure -modelAxesSize 0.2
- }
- "Medium" {
- gedCmd configure -modelAxesSize 0.4
- }
- "Large" {
- gedCmd configure -modelAxesSize 0.8
- }
- "X-Large" {
- gedCmd configure -modelAxesSize 1.6
- }
- "View (1x)" {
- gedCmd configure -modelAxesSize 2.0
- }
- "View (2x)" {
- gedCmd configure -modelAxesSize 4.0
- }
- "View (4x)" {
- gedCmd configure -modelAxesSize 8.0
- }
- "View (8x)" {
- gedCmd configure -modelAxesSize 16.0
- }
+ switch -- $mModelAxesSize {
+ "Small" {
+ gedCmd configure -modelAxesSize 0.2
}
+ "Medium" {
+ gedCmd configure -modelAxesSize 0.4
+ }
+ "Large" {
+ gedCmd configure -modelAxesSize 0.8
+ }
+ "X-Large" {
+ gedCmd configure -modelAxesSize 1.6
+ }
+ "View (1x)" {
+ gedCmd configure -modelAxesSize 2.0
+ }
+ "View (2x)" {
+ gedCmd configure -modelAxesSize 4.0
+ }
+ "View (4x)" {
+ gedCmd configure -modelAxesSize 8.0
+ }
+ "View (8x)" {
+ gedCmd configure -modelAxesSize 16.0
+ }
}
}
@@ -7753,18 +7676,12 @@
$mModelAxesPositionZPref != $Z} {
set mModelAxesPosition \
"$mModelAxesPositionXPref $mModelAxesPositionYPref
$mModelAxesPositionZPref"
-
- if {[info exists itk_component(ged)]} {
- gedCmd configure -modelAxesPosition $mModelAxesPosition
- }
+ gedCmd configure -modelAxesPosition $mModelAxesPosition
}
if {$mModelAxesLineWidthPref != $mModelAxesLineWidth} {
set mModelAxesLineWidth $mModelAxesLineWidthPref
-
- if {[info exists itk_component(ged)]} {
- gedCmd configure -modelAxesLineWidth $mModelAxesLineWidth
- }
+ gedCmd configure -modelAxesLineWidth $mModelAxesLineWidth
}
if {$mModelAxesColorPref != $mModelAxesColor} {
@@ -7777,42 +7694,27 @@
if {$mModelAxesTickIntervalPref != $mModelAxesTickInterval} {
set mModelAxesTickInterval $mModelAxesTickIntervalPref
-
- if {[info exists itk_component(ged)]} {
- gedCmd configure -modelAxesTickInterval $mModelAxesTickInterval
- }
+ gedCmd configure -modelAxesTickInterval $mModelAxesTickInterval
}
if {$mModelAxesTicksPerMajorPref != $mModelAxesTicksPerMajor} {
set mModelAxesTicksPerMajor $mModelAxesTicksPerMajorPref
-
- if {[info exists itk_component(ged)]} {
- gedCmd configure -modelAxesTicksPerMajor $mModelAxesTicksPerMajor
- }
+ gedCmd configure -modelAxesTicksPerMajor $mModelAxesTicksPerMajor
}
if {$mModelAxesTickThresholdPref != $mModelAxesTickThreshold} {
set mModelAxesTickThreshold $mModelAxesTickThresholdPref
-
- if {[info exists itk_component(ged)]} {
- gedCmd configure -modelAxesTickThreshold $mModelAxesTickThreshold
- }
+ gedCmd configure -modelAxesTickThreshold $mModelAxesTickThreshold
}
if {$mModelAxesTickLengthPref != $mModelAxesTickLength} {
set mModelAxesTickLength $mModelAxesTickLengthPref
-
- if {[info exists itk_component(ged)]} {
- gedCmd configure -modelAxesTickLength $mModelAxesTickLength
- }
+ gedCmd configure -modelAxesTickLength $mModelAxesTickLength
}
if {$mModelAxesTickMajorLengthPref != $mModelAxesTickMajorLength} {
set mModelAxesTickMajorLength $mModelAxesTickMajorLengthPref
-
- if {[info exists itk_component(ged)]} {
- gedCmd configure -modelAxesTickMajorLength
$mModelAxesTickMajorLength
- }
+ gedCmd configure -modelAxesTickMajorLength $mModelAxesTickMajorLength
}
if {$mModelAxesTickColorPref != $mModelAxesTickColor} {
@@ -7916,51 +7818,47 @@
if {$mViewAxesSizePref != $mViewAxesSize} {
set mViewAxesSize $mViewAxesSizePref
- if {[info exists itk_component(ged)]} {
- # sanity
- set offset 0.0
- switch -- $mViewAxesSize {
- "Small" {
- set offset 0.85
- gedCmd configure -viewAxesSize 0.2
- }
- "Medium" {
- set offset 0.75
- gedCmd configure -viewAxesSize 0.4
- }
- "Large" {
- set offset 0.55
- gedCmd configure -viewAxesSize 0.8
- }
- "X-Large" {
- set offset 0.0
- gedCmd configure -viewAxesSize 1.6
- }
+ # sanity
+ set offset 0.0
+ switch -- $mViewAxesSize {
+ "Small" {
+ set offset 0.85
+ gedCmd configure -viewAxesSize 0.2
}
+ "Medium" {
+ set offset 0.75
+ gedCmd configure -viewAxesSize 0.4
+ }
+ "Large" {
+ set offset 0.55
+ gedCmd configure -viewAxesSize 0.8
+ }
+ "X-Large" {
+ set offset 0.0
+ gedCmd configure -viewAxesSize 1.6
+ }
}
set positionNotSet 0
set mViewAxesPosition $mViewAxesPositionPref
- if {[info exists itk_component(ged)]} {
- switch -- $mViewAxesPosition {
- default -
- "Center" {
- gedCmd configure -viewAxesPosition {0 0 0}
- }
- "Upper Left" {
- gedCmd configure -viewAxesPosition "-$offset $offset 0"
- }
- "Upper Right" {
- gedCmd configure -viewAxesPosition "$offset $offset 0"
- }
- "Lower Left" {
- gedCmd configure -viewAxesPosition "-$offset -$offset 0"
- }
- "Lower Right" {
- gedCmd configure -viewAxesPosition "$offset -$offset 0"
- }
+ switch -- $mViewAxesPosition {
+ default -
+ "Center" {
+ gedCmd configure -viewAxesPosition {0 0 0}
}
+ "Upper Left" {
+ gedCmd configure -viewAxesPosition "-$offset $offset 0"
+ }
+ "Upper Right" {
+ gedCmd configure -viewAxesPosition "$offset $offset 0"
+ }
+ "Lower Left" {
+ gedCmd configure -viewAxesPosition "-$offset -$offset 0"
+ }
+ "Lower Right" {
+ gedCmd configure -viewAxesPosition "$offset -$offset 0"
+ }
}
}
@@ -7968,51 +7866,46 @@
$mViewAxesPositionPref != $mViewAxesPosition} {
set mViewAxesPosition $mViewAxesPositionPref
- if {[info exists itk_component(ged)]} {
- # sanity
- set offset 0.0
- switch -- $mViewAxesSize {
- "Small" {
- set offset 0.85
- }
- "Medium" {
- set offset 0.75
- }
- "Large" {
- set offset 0.55
- }
- "X-Large" {
- set offset 0.0
- }
+ # sanity
+ set offset 0.0
+ switch -- $mViewAxesSize {
+ "Small" {
+ set offset 0.85
}
+ "Medium" {
+ set offset 0.75
+ }
+ "Large" {
+ set offset 0.55
+ }
+ "X-Large" {
+ set offset 0.0
+ }
+ }
- switch -- $mViewAxesPosition {
- default -
- "Center" {
- gedCmd configure -viewAxesPosition {0 0 0}
- }
- "Upper Left" {
- gedCmd configure -viewAxesPosition "-$offset $offset 0"
- }
- "Upper Right" {
- gedCmd configure -viewAxesPosition "$offset $offset 0"
- }
- "Lower Left" {
- gedCmd configure -viewAxesPosition "-$offset -$offset 0"
- }
- "Lower Right" {
- gedCmd configure -viewAxesPosition "$offset -$offset 0"
- }
+ switch -- $mViewAxesPosition {
+ default -
+ "Center" {
+ gedCmd configure -viewAxesPosition {0 0 0}
}
+ "Upper Left" {
+ gedCmd configure -viewAxesPosition "-$offset $offset 0"
+ }
+ "Upper Right" {
+ gedCmd configure -viewAxesPosition "$offset $offset 0"
+ }
+ "Lower Left" {
+ gedCmd configure -viewAxesPosition "-$offset -$offset 0"
+ }
+ "Lower Right" {
+ gedCmd configure -viewAxesPosition "$offset -$offset 0"
+ }
}
}
if {$mViewAxesLineWidthPref != $mViewAxesLineWidth} {
set mViewAxesLineWidth $mViewAxesLineWidthPref
-
- if {[info exists itk_component(ged)]} {
- gedCmd configure -viewAxesLineWidth $mViewAxesLineWidth
- }
+ gedCmd configure -viewAxesLineWidth $mViewAxesLineWidth
}
if {$mViewAxesColorPref != $mViewAxesColor} {
Modified: brlcad/trunk/src/tclscripts/archer/ArcherCore.tcl
===================================================================
--- brlcad/trunk/src/tclscripts/archer/ArcherCore.tcl 2010-04-30 18:14:11 UTC
(rev 38924)
+++ brlcad/trunk/src/tclscripts/archer/ArcherCore.tcl 2010-04-30 19:37:09 UTC
(rev 38925)
@@ -1047,10 +1047,6 @@
}
::itcl::body ArcherCore::gedWrapper {cmd eflag hflag sflag tflag args} {
- if {![info exists itk_component(ged)]} {
- return
- }
-
SetWaitCursor $this
if {$eflag} {
@@ -1311,10 +1307,6 @@
}
::itcl::body ArcherCore::redrawObj {obj {wflag 1}} {
- if {![info exists itk_component(ged)]} {
- return
- }
-
if {$obj == ""} {
return
}
@@ -1874,10 +1866,6 @@
}
::itcl::body ArcherCore::refreshTree {{_restore 1}} {
- if {![info exists itk_component(ged)]} {
- return
- }
-
foreach node [array names mNode2Text] {
catch {$itk_component(newtree) delete $node}
}
@@ -2193,19 +2181,11 @@
}
::itcl::body ArcherCore::beginViewRotate {} {
- if {![info exists itk_component(ged)]} {
- return
- }
-
$itk_component(ged) init_view_rotate 1
$itk_component(ged) init_button_no_op 2
}
::itcl::body ArcherCore::endViewRotate {_pane} {
- if {![info exists itk_component(ged)]} {
- return
- }
-
$itk_component(ged) end_view_rotate $_pane
set ae [$itk_component(ged) pane_aet $_pane]
@@ -2213,19 +2193,11 @@
}
::itcl::body ArcherCore::beginViewScale {} {
- if {![info exists itk_component(ged)]} {
- return
- }
-
$itk_component(ged) init_view_scale 1
$itk_component(ged) init_button_no_op 2
}
::itcl::body ArcherCore::endViewScale {_pane} {
- if {![info exists itk_component(ged)]} {
- return
- }
-
$itk_component(ged) end_view_scale $_pane
set size [$itk_component(ged) pane_size $_pane]
@@ -2233,18 +2205,10 @@
}
::itcl::body ArcherCore::beginViewTranslate {} {
- if {![info exists itk_component(ged)]} {
- return
- }
-
$itk_component(ged) init_view_translate 1
}
::itcl::body ArcherCore::endViewTranslate {_pane} {
- if {![info exists itk_component(ged)]} {
- return
- }
-
$itk_component(ged) end_view_translate $_pane
set center [$itk_component(ged) pane_center $_pane]
@@ -2252,10 +2216,6 @@
}
::itcl::body ArcherCore::initViewCenterMode {} {
- if {![info exists itk_component(ged)]} {
- return
- }
-
$itk_component(ged) init_view_center 1
$itk_component(ged) clear_mouse_ray_callback_list
@@ -2264,10 +2224,6 @@
}
::itcl::body ArcherCore::initCompErase {} {
- if {![info exists itk_component(ged)]} {
- return
- }
-
$itk_component(ged) clear_mouse_ray_callback_list
$itk_component(ged) add_mouse_ray_callback [::itcl::code $this
mrayCallback_erase]
$itk_component(ged) init_comp_pick 1
@@ -2275,10 +2231,6 @@
}
::itcl::body ArcherCore::initCompPick {} {
- if {![info exists itk_component(ged)]} {
- return
- }
-
$itk_component(ged) clear_mouse_ray_callback_list
$itk_component(ged) add_mouse_ray_callback [::itcl::code $this
mrayCallback_pick]
$itk_component(ged) init_comp_pick 1
@@ -2352,10 +2304,6 @@
}
::itcl::body ArcherCore::initViewMeasure {} {
- if {![info exists itk_component(ged)]} {
- return
- }
-
$itk_component(ged) clear_view_measure_callback_list
$itk_component(ged) add_view_measure_callback [::itcl::code $this
endViewMeasure]
$itk_component(ged) init_view_measure
@@ -2367,10 +2315,6 @@
}
::itcl::body ArcherCore::initDefaultBindings {{_comp ""}} {
- if {![info exists itk_component(ged)]} {
- return
- }
-
$itk_component(primaryToolbar) itemconfigure rotate -state normal
$itk_component(primaryToolbar) itemconfigure translate -state normal
$itk_component(primaryToolbar) itemconfigure scale -state normal
@@ -2387,10 +2331,6 @@
}
::itcl::body ArcherCore::initBrlcadBindings {} {
- if {![info exists itk_component(ged)]} {
- return
- }
-
$itk_component(primaryToolbar) itemconfigure rotate -state disabled
$itk_component(primaryToolbar) itemconfigure translate -state disabled
$itk_component(primaryToolbar) itemconfigure scale -state disabled
@@ -2456,15 +2396,6 @@
set mCurrentPaneName ""
set mBackground [list $r $g $b]
- if {![info exists itk_component(ged)]} {
- set color [getTkColor \
- [lindex $mBackground 0] \
- [lindex $mBackground 1] \
- [lindex $mBackground 2]]
- $itk_component(canvas) configure -background $color
- } else {
- eval gedCmd bg_all $mBackground
- }
}
@@ -2619,10 +2550,6 @@
}
::itcl::body ArcherCore::gedCmd {args} {
- if {![info exists itk_component(ged)]} {
- return
- }
-
return [eval $itk_component(ged) $args]
}
@@ -2940,20 +2867,12 @@
}
::itcl::body ArcherCore::doViewReset {} {
- if {![info exists itk_component(ged)]} {
- return
- }
-
set mCurrentPaneName ""
gedCmd autoview_all
gedCmd default_views
}
::itcl::body ArcherCore::doAutoview {} {
- if {![info exists itk_component(ged)]} {
- return
- }
-
if {$mCurrentPaneName == ""} {
set pane $mActivePaneName
} else {
@@ -2965,10 +2884,6 @@
}
::itcl::body ArcherCore::doViewCenter {} {
- if {![info exists itk_component(ged)]} {
- return
- }
-
if {$mCurrentPaneName == ""} {
set pane $mActivePaneName
} else {
@@ -4211,10 +4126,6 @@
#XXXX Needs more flexibility (i.e. position and orientation)
::itcl::body ArcherCore::buildGroundPlane {} {
- if {![info exists itk_component(ged)]} {
- return
- }
-
catch {gedCmd vdraw vlist delete groundPlaneMajor}
catch {gedCmd vdraw vlist delete groundPlaneMinor}
@@ -4265,10 +4176,6 @@
}
::itcl::body ArcherCore::showGroundPlane {} {
- if {![info exists itk_component(ged)]} {
- return
- }
-
set savePwd ""
if {$mShowGroundPlane} {
@@ -4289,10 +4196,6 @@
}
::itcl::body ArcherCore::showPrimitiveLabels {} {
- if {![info exists itk_component(ged)]} {
- return
- }
-
if {!$mShowPrimitiveLabels} {
gedCmd configure -primitiveLabels {}
}
@@ -4301,22 +4204,12 @@
}
::itcl::body ArcherCore::showViewParams {} {
- if {[info exists itk_component(ged)]} {
- $itk_component(ged) configure -showViewingParams $mShowViewingParams
- } else {
- return
- }
-
+ $itk_component(ged) configure -showViewingParams $mShowViewingParams
refreshDisplay
}
::itcl::body ArcherCore::showScale {} {
- if {[info exists itk_component(ged)]} {
- $itk_component(ged) configure -scaleEnable $mShowScale
- } else {
- return
- }
-
+ $itk_component(ged) configure -scaleEnable $mShowScale
refreshDisplay
}
@@ -4329,10 +4222,6 @@
::itcl::body ArcherCore::launchNirt {} {
- if {![info exists itk_component(ged)] || $mViewOnly} {
- return
- }
-
putString "nirt -b"
putString [$itk_component(ged) nirt -b]
}
@@ -4340,10 +4229,6 @@
::itcl::body ArcherCore::launchRtApp {app size} {
global tcl_platform
- if {![info exists itk_component(ged)]} {
- return
- }
-
if {![string is digit $size]} {
set size [winfo width $itk_component(ged)]
}
@@ -5127,10 +5012,6 @@
}
::itcl::body ArcherCore::updateDisplaySettings {} {
- if {![info exists itk_component(ged)]} {
- return
- }
-
switch -- $mZClipMode \
$ZCLIP_SMALL_CUBE { \
$itk_component(ged) zclip_all 1; \
@@ -5349,10 +5230,6 @@
}
::itcl::body ArcherCore::watchVar {_name1 _name2 _op} {
- if {![info exists itk_component(ged)]} {
- return
- }
-
switch -- $_name1 {
mMeasuringStickColor {
$itk_component(ged) configure -measuringStickColor
$mMeasuringStickColor
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