Ignore:
Timestamp:
Nov 16, 2009 3:02:37 PM (15 years ago)
Author:
dkearney
Message:

tabs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gui/scripts/xyresult.tcl

    r1606 r1614  
    488488                # if we haven't created the popup yet, do it now
    489489                Rappture::Balloon $popup \
    490                     -title "[Rappture::filexfer::label downloadWord] as..."
     490                    -title "[Rappture::filexfer::label downloadWord] as..."
    491491                set inner [$popup component inner]
    492492                label $inner.summary -text "" -anchor w
     
    559559                }
    560560                image {
    561                     set popup .xyprintdownload
    562                     if { ![winfo exists $popup] } {
    563                         # Create a popup for the print dialog
    564                         Rappture::Balloon $popup -title "Save as image..."
    565                         set inner [$popup component inner]
    566                         # Create the print dialog widget and add it to the
    567                         # the balloon popup.
    568                         Rappture::XyPrint $inner.print
    569                         $popup configure \
    570                             -deactivatecommand [list $inner.print reset]
    571                         blt::table $inner 0,0 $inner.print -fill both
    572                     }
    573                     update
    574                     # Activate the popup and call for the output.
    575                     foreach { widget toolName plotName } $args break
    576                     $popup activate $widget left
    577                     set inner [$popup component inner]
    578                     set output [$inner.print print $itk_component(plot) \
    579                                     $toolName $plotName]
    580                     $popup deactivate
     561                    set popup .xyprintdownload
     562                    if { ![winfo exists $popup] } {
     563                        # Create a popup for the print dialog
     564                        Rappture::Balloon $popup -title "Save as image..."
     565                        set inner [$popup component inner]
     566                        # Create the print dialog widget and add it to the
     567                        # the balloon popup.
     568                        Rappture::XyPrint $inner.print
     569                        $popup configure \
     570                            -deactivatecommand [list $inner.print reset]
     571                        blt::table $inner 0,0 $inner.print -fill both
     572                    }
     573                    update
     574                    # Activate the popup and call for the output.
     575                    foreach { widget toolName plotName } $args break
     576                    $popup activate $widget left
     577                    set inner [$popup component inner]
     578                    set output [$inner.print print $itk_component(plot) \
     579                                    $toolName $plotName]
     580                    $popup deactivate
    581581                    return $output
    582582                }
     
    721721            set elem "elem[incr count]"
    722722            set _elem2curve($elem) $curve
    723             lappend label2elem($label) $elem
     723            lappend label2elem($label) $elem
    724724            $g element create $elem -x $xv -y $yv \
    725725                -symbol $sym -pixels $pixels -linewidth $lwidth \
    726                 -label $label \
     726                -label $label \
    727727                -color $color -dashes $dashes \
    728728                -mapx $mapx -mapy $mapy
     
    732732    # Fix duplicate labels by appending the simulation number
    733733    foreach label [array names label2elem] {
    734         if { [llength $label2elem($label)] == 1 } {
    735             continue
    736         }
    737         foreach elem $label2elem($label) {
    738             set curve $_elem2curve($elem)
    739             scan [$curve hints xmlobj] "::libraryObj%d" suffix
    740             incr suffix
    741             set elabel [format "%s \#%d" $label $suffix]
    742             $g element configure $elem -label $elabel
    743         }
    744     }   
     734        if { [llength $label2elem($label)] == 1 } {
     735            continue
     736        }
     737        foreach elem $label2elem($label) {
     738            set curve $_elem2curve($elem)
     739            scan [$curve hints xmlobj] "::libraryObj%d" suffix
     740            incr suffix
     741            set elabel [format "%s \#%d" $label $suffix]
     742            $g element configure $elem -label $elabel
     743        }
     744    }       
    745745
    746746    foreach curve $_clist {
     
    827827                    set logmin [expr {floor(log10(abs($min)))}]
    828828                    set logmax [expr {ceil(log10(abs($max)))}]
    829                     if 0 {
     829                    if 0 {
    830830                    if {[string match y* $axis]} {
    831831                        # add a little padding
     
    835835                        set logmax [expr {$logmax+0.05*$delta}]
    836836                    }
    837                     }
     837                    }
    838838                }
    839839                if {$logmin < -300} {
     
    856856                set max $_limits(${axis}lin-max)
    857857
    858                 if 0 {
     858                if 0 {
    859859                if {[string match y* $axis]} {
    860860                    # add a little padding
     
    863863                    set max [expr {$max+0.05*$delta}]
    864864                }
    865                 }
     865                }
    866866            }
    867867            if {$min < $max} {
Note: See TracChangeset for help on using the changeset viewer.