- Timestamp:
- Apr 7, 2014 4:30:15 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/scripts/mapviewer.tcl
r4329 r4330 119 119 private variable _reset 1; # Indicates that server was reset and 120 120 # needs to be reinitialized. 121 private variable _initCamera 1; 121 122 private variable _haveTerrain 0 122 123 … … 940 941 } 941 942 } 943 # XXX: Remove these after implementing batch load of layers with reset 944 # This is needed to force a valid render before deleting the base layer 945 # Don't want to flush since we don't need to see this image 946 SendCmd "render" 942 947 SendCmd "map layer delete base" 943 948 } … … 956 961 error "No map settings on reset" 957 962 } 958 959 # FIXME: How to tell if this is the first reset?960 # If we reset the connection, we shouldn't use961 # the map settings962 if { [info exists _mapsettings(camera)] } {963 set location $_mapsettings(camera)964 if { $location != "" } {965 array set _view $location966 }967 }968 camera set all969 SendCmd "imgflush"970 963 } 971 964 … … 1002 995 #SetLayerOpacity $layer 1003 996 } 997 } 998 } 999 1000 if {$_reset} { 1001 if {$_initCamera} { 1002 # If this is the first Rebuild, we need to 1003 # set up the initial view settings if there 1004 # are any 1005 if { [info exists _mapsettings(camera)] } { 1006 set location $_mapsettings(camera) 1007 if { $location != "" } { 1008 array set _view $location 1009 camera set all 1010 } 1011 } 1012 set _initCamera 0 1013 } else { 1014 # Restore view from before reconnect 1015 camera set all 1004 1016 } 1005 1017 }
Note: See TracChangeset
for help on using the changeset viewer.