Revision: 54604
          http://brlcad.svn.sourceforge.net/brlcad/?rev=54604&view=rev
Author:   bob1961
Date:     2013-03-11 15:32:40 +0000 (Mon, 11 Mar 2013)
Log Message:
-----------
Improvements to the double-click mechanism in Archer and to the BOT edit panel 
(i.e. fewer bot table updates)

Modified Paths:
--------------
    brlcad/trunk/src/tclscripts/archer/Archer.tcl
    brlcad/trunk/src/tclscripts/archer/ArcherCore.tcl
    brlcad/trunk/src/tclscripts/archer/BotEditFrame.tcl

Modified: brlcad/trunk/src/tclscripts/archer/Archer.tcl
===================================================================
--- brlcad/trunk/src/tclscripts/archer/Archer.tcl       2013-03-11 12:13:40 UTC 
(rev 54603)
+++ brlcad/trunk/src/tclscripts/archer/Archer.tcl       2013-03-11 15:32:40 UTC 
(rev 54604)
@@ -2099,7 +2099,9 @@
 
 
 ::itcl::body Archer::handleTreeSelect {} {
-    ::ArcherCore::handleTreeSelect
+    if {[::ArcherCore::handleTreeSelect]} {
+       return
+    }
 
     if {!$mViewOnly} {
        if {$mObjViewMode == $OBJ_ATTR_VIEW_MODE} {

Modified: brlcad/trunk/src/tclscripts/archer/ArcherCore.tcl
===================================================================
--- brlcad/trunk/src/tclscripts/archer/ArcherCore.tcl   2013-03-11 12:13:40 UTC 
(rev 54603)
+++ brlcad/trunk/src/tclscripts/archer/ArcherCore.tcl   2013-03-11 15:32:40 UTC 
(rev 54604)
@@ -402,6 +402,7 @@
        variable mPrevTreeMode2 $TREE_MODE_COLOR_OBJECTS
        variable mToolViewChange 0
        variable mTreePopupBusy 0
+       variable mDoubleClickActive 0
 
        variable mSavedCenter ""
        variable mSavedViewEyePt ""
@@ -4034,6 +4035,8 @@
 
 
 ::itcl::body ArcherCore::dblClick {_x _y} {
+    set mDoubleClickActive 1
+
     set item [$itk_component(newtree) identify row $_x $_y]
     set obj [$itk_component(newtree) item $item -text]
     set path [getTreePath $item $obj]
@@ -4725,6 +4728,11 @@
 }
 
 ::itcl::body ArcherCore::handleTreeSelect {} {
+    if {$mDoubleClickActive} {
+       set mDoubleClickActive 0
+       return 1
+    }
+
     foreach anode $mAffectedNodeList {
        removeTreeNodeTag $anode $TREE_AFFECTED_TAG
     }
@@ -4733,7 +4741,7 @@
     set snode [$itk_component(newtree) selection]
 
     if {$snode == ""} {
-       return
+       return 1
     }
 
     set mPrevSelectedObjPath $mSelectedObjPath
@@ -4741,6 +4749,10 @@
     set mSelectedObjPath [getTreePath $snode]
     set mSelectedObj $mNode2Text($snode)
 
+    if {$mPrevSelectedObjPath == $mSelectedObjPath} {
+       return 1
+    }
+
     # label the object if it's being drawn
     set mRenderMode [gedCmd how $mSelectedObjPath]
 
@@ -4753,7 +4765,7 @@
     }
 
     if {!$mEnableAffectedNodeHighlight} {
-       return
+       return 0
     }
 
     if {$mEnableListView} {
@@ -4819,6 +4831,8 @@
            }
        }
     }
+
+    return 0
 }
 
 ::itcl::body ArcherCore::addTreeNodeTag {_node _tag} {

Modified: brlcad/trunk/src/tclscripts/archer/BotEditFrame.tcl
===================================================================
--- brlcad/trunk/src/tclscripts/archer/BotEditFrame.tcl 2013-03-11 12:13:40 UTC 
(rev 54603)
+++ brlcad/trunk/src/tclscripts/archer/BotEditFrame.tcl 2013-03-11 15:32:40 UTC 
(rev 54604)
@@ -581,7 +581,7 @@
     } {}
     itk_component add ignoreMaxVertThreshCB {
        ::ttk::checkbutton $parent.ignoreMaxVertThreshCB \
-           -text "Always Show Tables" \
+           -text "Always Allow Edit" \
            -command [::itcl::code $this reloadTables] \
            -variable [::itcl::scope mIgnoreMaxVertThreshold]
     } {}
@@ -995,7 +995,9 @@
        set mShowTables 0
     }
 
-    manageTables
+    if {![manageTables]} {
+       return
+    }
 
     if {!$_lflag} {
        set mPointList {}
@@ -1136,10 +1138,28 @@
        grid rowconfigure $parent $row -weight 1
 
        grid columnconfigure $parent 1 -weight 1
+
+       set i 1
+       foreach label $mEditLabels {
+           $itk_component(editRB$i) configure -state normal
+           incr i
+       }
+
+       return 1
     } else {
+       clearEditState
+
        grid forget $itk_component(vertTabLF)
        grid forget $itk_component(edgeTabLF)
        grid forget $itk_component(faceTabLF)
+
+       set i 1
+       foreach label $mEditLabels {
+           $itk_component(editRB$i) configure -state disabled
+           incr i
+       }
+
+       return 0
     }
 }
 
@@ -1164,7 +1184,7 @@
 
 ::itcl::body BotEditFrame::reloadTables {} {
     set gdata [lrange [$itk_option(-mged) get $itk_option(-geometryObject)] 1 
end]
-    loadTables $gdata 0
+    loadTables $gdata
 }
 
 

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


------------------------------------------------------------------------------
Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester  
Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the  
endpoint security space. For insight on selecting the right partner to 
tackle endpoint security challenges, access the full report. 
http://p.sf.net/sfu/symantec-dev2dev
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to