Changeset 1104 for branches/sandbox


Ignore:
Timestamp:
Dec 22, 2010 4:24:18 PM (13 years ago)
Author:
toby
Message:

for new .EXP files, bring users to the histogram or phase panels, as appropriate

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/sandbox/expgui

    r1036 r1104  
    408408}
    409409
    410 
    411410# [re]load all screens with current state of EXPGUI file
    412411proc PaintEXPGUIpages {} {
     
    532531    if {$newexpfile == ""} return
    533532
    534     # switch to the 1st page
    535     RaisePage lsFrame
    536533    set expgui(globalmode) 0
    537534    loadexp $newexpfile
     535
     536    # switch to the appropriate 1st page
     537    #StageTabUse
     538    SetStartPanel
    538539
    539540    # reset the phase selection
     
    10361037        DisplayRefFlags 0 0
    10371038        $expgui(atomlistbox) delete 0 end
     1039        $expgui(AddAtomBut)  config -state disabled
    10381040        return
    10391041    }
     
    10641066    DisplayRefFlags 0 0
    10651067    $expgui(EditingAtoms) config -text ""
     1068    $expgui(AddAtomBut)  config -state normal
    10661069
    10671070    DisplayAllAtoms $crsPhase
     
    33293332    }
    33303333}
     3334
     3335set expgui(startpanel) 2
    33313336# procedure to disable tabs when phases or histograms are not defined
    33323337proc StageTabUse {args} {
    33333338    global expgui
     3339    set expgui(startpanel) 2
    33343340    # reset everything
    33353341    foreach item [lrange $::expgui(notebookpagelist) 0 end] {
     
    33563362            .n itemconfigure $frm -state disabled
    33573363        }
     3364        set expgui(startpanel) 0
    33583365        return
    33593366    }
     
    33743381            .n itemconfigure $frm -state disabled
    33753382        }
     3383        set expgui(startpanel) 0
    33763384        return
    33773385    }
     
    33833391            .n itemconfigure $frm -state disabled
    33843392        }
     3393        set expgui(startpanel) 1
    33853394        return
    33863395    }
     
    33963405    .n see $nextpage
    33973406    .n raise $nextpage
     3407}
     3408
     3409proc SetStartPanel {} {
     3410    global expgui
     3411    if {$expgui(startpanel) == 0} {
     3412        RaisePage phaseFrame
     3413    } elseif {$expgui(startpanel) == 1} {
     3414        RaisePage histFrame
     3415    } else {
     3416        RaisePage lsFrame
     3417    }
    33983418}
    33993419
     
    44844504LocateWindow "." $xpos $ypos $poscntr
    44854505update
    4486 RaisePage lsFrame
     4506SetStartPanel
    44874507if {[CountHistory] > 200} {
    44884508    DeleteHistoryRecords "This .EXP file has [CountHistory] history records\nErasing most will speed EXPGUI"
Note: See TracChangeset for help on using the changeset viewer.