Changeset 5962


Ignore:
Timestamp:
Jan 19, 2016 12:05:30 PM (7 years ago)
Author:
ldelgass
Message:

add deleteViewpoint method

File:
1 edited

Legend:

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

    r5959 r5962  
    3333    public method addViewpoint { name props }
    3434    public method deleteLayer { layerName }
     35    public method deleteViewpoint { viewpointName }
    3536    public method earthfile {}
    3637    public method hasLayer { layerName }
     
    768769}
    769770
     771itcl::body Rappture::Map::deleteViewpoint { viewopintName } {
     772    set id [$_tree findchild root->"viewpoints" $viewpointName]
     773    if { $id < 0 } {
     774        error "unknown viewpoint \"$viewpointName\""
     775    }
     776    $_tree delete $id
     777}
     778
    770779# ----------------------------------------------------------------------
    771780# USAGE: type <layerName>
Note: See TracChangeset for help on using the changeset viewer.