Changeset 1219 for trunk/atomcons.tcl
- Timestamp:
- Aug 19, 2012 1:24:43 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/atomcons.tcl
r1025 r1219 11 11 grid [NoteBook $expgui(consFrame).n -bd 2 -side bottom] -sticky news 12 12 source [file join $expgui(scriptdir) profcons.tcl] 13 source [file join $expgui(scriptdir) distrest.tcl]14 13 } 15 14 … … 21 20 catch {$expgui(consFrame).n delete macro} 22 21 catch {$expgui(consFrame).n delete profile} 23 catch {$expgui(consFrame).n delete distrest}24 22 set atom normal 25 23 set mm disabled … … 47 45 -createcmd "MakeProfileConstraintsPane" \ 48 46 -raisecmd "DisplayProfileConstraints"] 49 set expcons(distmaster) [\ 50 $expgui(consFrame).n insert end distrest -text "Distance Restraints" \ 51 -state $atom \ 52 -createcmd "" \ 53 -raisecmd "DisplayDistanceRestraints"] 54 47 55 48 set page [$expgui(consFrame).n raise] 56 49 # open the atom constraints page if no page is open … … 829 822 DisplayAtomConstraints $mode 830 823 } 824 ###################################################################### 825 # restraints codes 826 ###################################################################### 827 # this is used once to create the constraint page 828 proc MakeRestraintsPane {} { 829 global expgui expcons expmap 830 # create the notebook 831 grid [NoteBook $expgui(restrFrame).n -bd 2 -side bottom] -sticky news 832 source [file join $expgui(scriptdir) distrest.tcl] 833 source [file join $expgui(scriptdir) chemrest.tcl] 834 } 835 836 # this is used to update the contents of the constraint page when displayed 837 proc DisplayRestraintsPane {} { 838 global expgui expcons expmap 839 # create pages for each of the constraint "subpages" 840 catch {$expgui(restrFrame).n delete distrest} 841 catch {$expgui(restrFrame).n delete chemrest} 842 set atom normal 843 set mm disabled 844 if {[llength $expmap(phasetype)] == 0} { 845 set atom disabled 846 } elseif {[lindex $expmap(phasetype) 0] == 4} { 847 set mm normal 848 if {[llength $expmap(phasetype)] == 1} { 849 set atom disabled 850 } 851 } 852 set expcons(distmaster) [\ 853 $expgui(restrFrame).n insert end distrest -text "Distance Restraints" \ 854 -state $atom \ 855 -createcmd "" \ 856 -raisecmd "DisplayDistanceRestraints"] 857 858 set expcons(chemmaster) [\ 859 $expgui(restrFrame).n insert end chemrest -text "Chemical Restraints" \ 860 -state $atom \ 861 -createcmd "" \ 862 -raisecmd "DisplayChemRestraints"] 863 864 set page [$expgui(restrFrame).n raise] 865 # open the atom constraints page if no page is open 866 if {$page == ""} { 867 foreach page [$expgui(restrFrame).n pages] { 868 # loop to the first non-disabled page 869 if {[$expgui(restrFrame).n itemcget $page -state] == "normal"} { 870 $expgui(restrFrame).n raise $page 871 return 872 } 873 } 874 } else { 875 set pageupdate [$expgui(restrFrame).n itemcget $page -raisecmd] 876 catch $pageupdate 877 } 878 }
Note: See TracChangeset
for help on using the changeset viewer.