Skip to content

Commit

Permalink
FIX: Return sizes list with simple format.
Browse files Browse the repository at this point in the history
  • Loading branch information
vanyossi committed Oct 15, 2013
1 parent f0b95b7 commit bef8601
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions artscript2.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,6 @@ proc getWidthHeightSVG { f } {
close $fl
set lines [lrange [split $data \n] 1 30]
foreach l $lines {
puts $l
set l [lsearch -inline -regexp -all $l {^(width|height)} ]
if {[string length $l] > 0} {
set start [string last "=" $l]
Expand Down Expand Up @@ -1110,7 +1109,7 @@ proc tabResize {st} {
}

if { [llength $sizesels] > 1 } {
treeAlterVal .f2.fb.flist osize osize {getOutputSizesForTree $fsize}
treeAlterVal .f2.fb.flist osize osize {getOutputSizesForTree $fsize 1}
} elseif { [llength $sizesels] == 1 } {
treeAlterVal .f2.fb.flist osize osize {getOutputSizesForTree $fsize}
bindsetAction 0 0 sizesel .f3.rev.checksz
Expand Down Expand Up @@ -1314,9 +1313,9 @@ proc getOutputSize { w h dw dh } {
}

# Calculates scaling destination for size in respect of chosen sizes
# size, string WidthxHeight, the original file size
# Returns a list of wxh elements
proc getOutputSizesForTree { size } {
# size, string WidthxHeight, the original file size,
# Returns a list of wxh elements, Bool returns formated list
proc getOutputSizesForTree { size {formated 0}} {
set cur_w [lindex [split $size {x} ] 0]
set cur_h [lindex [split $size {x} ] 1]

Expand All @@ -1336,6 +1335,9 @@ proc getOutputSizesForTree { size } {
#Add resize filter (better quality)
lappend fsizes $finalscale
}
if {$formated} {
return [join $fsizes {, }]
}
return $fsizes
}
#Preproces functions
Expand Down

0 comments on commit bef8601

Please sign in to comment.