Changeset 5151


Ignore:
Timestamp:
Mar 18, 2015 7:59:09 AM (9 years ago)
Author:
ldelgass
Message:

Delete colormap files in ~Renderer

Location:
geovis/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • geovis/trunk/Renderer.cpp

    r5118 r5151  
    143143    TRACE("Enter");
    144144
     145    // Removes temp files
     146    deleteColorMap("all");
     147
    145148    // Cache is deleted in main() to allow ref-counted objects to
    146149    // be deleted and threads to exit first
     
    258261
    259262    do {
    260         if (itr->first.compare("default") == 0 ||
    261             itr->first.compare("grayDefault") == 0) {
    262             if (id.compare("all") != 0) {
    263                 WARN("Cannot delete a default color map");
    264             }
    265             continue;
    266         }
    267 
    268263        TRACE("Deleting ColorMap %s", itr->first.c_str());
     264        std::string path = getColorMapFilePath(itr->first);
     265        if (remove(path.c_str()) < 0) {
     266            ERROR("Failed to delete colormap file '%s': %s",
     267                  path.c_str(), strerror(errno));
     268        }
    269269        itr = _colorMaps.erase(itr);
    270270    } while (doAll && itr != _colorMaps.end());
  • geovis/trunk/RendererCmd.cpp

    r5119 r5151  
    578578    if (objc == 3) {
    579579        const char *name = Tcl_GetString(objv[2]);
     580#if 0
     581        if (strcmp(name, "default") == 0 ||
     582            strcmp(name, "grayDefault") == 0) {
     583            WARN("Cannot delete a default color map");
     584            return TCL_ERROR;
     585        }
     586#endif
    580587        g_renderer->deleteColorMap(name);
    581588    } else {
  • geovis/trunk/geovis_protocol.txt

    r5119 r5151  
    154154    Add a WMS image layer from a URL + layer string
    155155    <url> = URL of WMS service
    156     <cache> = bool indicating if tiles should be cached on disk
     156    <cache> = bool indicating if tiles may be cached on disk
    157157    <layers> = layers string for WMS server
    158158    <format> = Image format to return (e.g. 'png')
Note: See TracChangeset for help on using the changeset viewer.