Changeset 3610


Ignore:
Timestamp:
Apr 2, 2013, 2:35:09 PM (12 years ago)
Author:
gah
Message:

fix: xygraph print not handling labels like "Cooling [K] #23" because of square brackets

File:
1 edited

Legend:

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

    r3330 r3610  
    14111411    foreach opt { -width -height -leftmargin -rightmargin -topmargin
    14121412        -bottommargin -plotpadx -plotpady } {
    1413         set value [list [$_clone cget $opt]]
    1414         append out " $opt $value"
     1413        set value [$_clone cget $opt]
     1414        append out " $opt [list $value]"
    14151415    }
    14161416    append out "\n"
     
    14191419    append out "    preview legend configure"
    14201420    foreach opt { -position -anchor -borderwidth -hide } {
    1421         set value [list [$_clone legend cget $opt]]
    1422         append out " $opt $value"
    1423     }
    1424     append out " -font \"$legendfont\"\n"
     1421        set value [$_clone legend cget $opt]
     1422        append out " $opt [list $value]"
     1423    }
     1424    append out " -font [list $legendfont]\n"
    14251425
    14261426    # Element settings
     
    14301430            continue
    14311431        }
    1432         append out "    if \{ \[preview element exists \"$label\"\] \} \{\n"
    1433         append out "        preview element configure \"$label\""
     1432        set label [list $label]
     1433        append out "    if \{ \[preview element exists $label] \} \{\n"
     1434        append out "        preview element configure $label"
    14341435        if { [$_clone element type $elem] != "bar" } {
    14351436            set options { -symbol -color -dashes -label }
     
    14381439        }
    14391440        foreach opt $options {
    1440             set value [list [$_clone element cget $elem $opt]]
    1441             append out " $opt $value"
     1441            set value [$_clone element cget $elem $opt]
     1442            append out " $opt [list $value]"
    14421443        }
    14431444        append out "    \}\n"
     
    14491450            continue
    14501451        }
    1451         append out "    if \{ \[preview axis names \"$axis\"\] == \"$axis\" \} \{\n"
    1452         append out "        preview axis configure \"$axis\""
     1452        set axis [list $axis]
     1453        append out "    if \{ \[preview axis names $axis] == $axis \} \{\n"
     1454        append out "        preview axis configure $axis"
    14531455        foreach opt { -hide -min -max -loose -title -stepsize -subdivisions } {
    1454             set value [list [$_clone axis cget $axis $opt]]
    1455             append out " $opt $value"
    1456         }
    1457         append out " -tickfont \"$axistickfont\""
    1458         append out " -titlefont \"$axistitlefont\"\n"
     1456            set value [$_clone axis cget $axis $opt]
     1457            append out " $opt [list $value]"
     1458        }
     1459        append out " -tickfont [list $axistickfont]"
     1460        append out " -titlefont [list $axistitlefont]\n"
    14591461        set hide [$_clone marker cget ${axis}-zero -hide]
    1460         append out "        preview marker configure \"${axis}-zero\" -hide $hide\n"
     1462        append out "        preview marker configure ${axis}-zero -hide $hide\n"
    14611463        append out "    \}\n"
    14621464    }   
Note: See TracChangeset for help on using the changeset viewer.