Changeset 87


Ignore:
Timestamp:
Dec 4, 2009 5:00:11 PM (11 years ago)
Author:
toby
Message:

# on 1999/04/20 19:22:46, toby did:
rearrange order of commands so that graph & menus are made when icdd & cmpr are added

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/liveplot

    • Property rcs:date changed from 1999/04/08 20:33:23 to 1999/04/20 19:22:46
    • Property rcs:lines changed from +137 -106 to +38 -38
    • Property rcs:rev changed from 1.9 to 1.10
    r79 r87  
    766766}
    767767
    768 # fetch EXP file processing routines
    769 #source [file join $expgui(scriptdir) readexp.tcl]
    770 
    771 set fl [file join $expgui(scriptdir) icddcmd.tcl]
    772 if [file exists $fl] {source $fl}
    773 set fl [file join $expgui(scriptdir) cellgen.tcl]
    774 if [file exists $fl] {source $fl}
     768proc plotdataupdate {array element action} {
     769    global box peakinfo reflns graph
     770    # parse the element
     771    regexp {([a-z]*)([0-9]*)} $element junk var num
     772    if {$var == "color"} {
     773        if {$peakinfo($element) == ""} return
     774        if [catch {
     775            .opt$num.c$num.2 config -bg $peakinfo($element)
     776        } ] return
     777        set i $num
     778        set j 0
     779        if [set peakinfo(flag$i)] {
     780            catch {
     781                $box element config phase$i -color $peakinfo(color$i)
     782            }
     783            foreach X $reflns($i) {
     784                incr j
     785                catch {
     786                    $box marker config peaks${i}_$j \
     787                            $graph(MarkerColorOpt) [list $peakinfo(color$i)]
     788                }
     789            }
     790        }
     791        return
     792    }
     793    waitmsg {Updating}
     794    plotdata $box
     795    donewait
     796}
    775797
    776798# override options with locally defined values
     
    906928pack .a -side top -fill both
    907929pack $box -fill both -expand yes
     930
     931# add the extra options
     932set fl [file join $expgui(scriptdir) icddcmd.tcl]
     933if [file exists $fl] {source $fl}
     934set fl [file join $expgui(scriptdir) cellgen.tcl]
     935if [file exists $fl] {source $fl}
     936
    908937donewait
    909 proc plotdataupdate {array element action} {
    910     global box peakinfo reflns graph
    911     # parse the element
    912     regexp {([a-z]*)([0-9]*)} $element junk var num
    913     if {$var == "color"} {
    914         if {$peakinfo($element) == ""} return
    915         if [catch {
    916             .opt$num.c$num.2 config -bg $peakinfo($element)
    917         } ] return
    918         set i $num
    919         set j 0
    920         if [set peakinfo(flag$i)] {
    921             catch {
    922                 $box element config phase$i -color $peakinfo(color$i)
    923             }
    924             foreach X $reflns($i) {
    925                 incr j
    926                 catch {
    927                     $box marker config peaks${i}_$j \
    928                             $graph(MarkerColorOpt) [list $peakinfo(color$i)]
    929                 }
    930             }
    931         }
    932         return
    933     }
    934     waitmsg {Updating}
    935     plotdata $box
    936     donewait
    937 }
    938938trace variable peakinfo w plotdataupdate
Note: See TracChangeset for help on using the changeset viewer.