Changeset 5125


Ignore:
Timestamp:
Mar 13, 2015 5:24:04 PM (5 years ago)
Author:
ldelgass
Message:

normalize whitespace in colormap tags

File:
1 edited

Legend:

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

    r5106 r5125  
    151151            $_tree set $child "colorramp.elevdriver" "gdal"
    152152            $_tree set $child "colorramp.colormap" "0 0 0 0 1 1 1 1 1 1"
    153             foreach key { url colormap elevdriver } {
     153            set cmap [$layers get $layer.colorramp.colormap]
     154            if {$cmap != ""} {
     155                # Normalize whitespace
     156                regsub -all "\[ \t\r\n\]+" [string trim $cmap] " " cmap
     157                $_tree set $child "colorramp.colormap" $cmap
     158            }
     159            foreach key { url elevdriver } {
    154160                set value [$layers get $layer.colorramp.$key]
    155161                if {$value != ""} {
Note: See TracChangeset for help on using the changeset viewer.