diff options
Diffstat (limited to 'tksao/colorbar/colorbar.C')
-rw-r--r-- | tksao/colorbar/colorbar.C | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/tksao/colorbar/colorbar.C b/tksao/colorbar/colorbar.C index 49229cd..5b7a817 100644 --- a/tksao/colorbar/colorbar.C +++ b/tksao/colorbar/colorbar.C @@ -487,7 +487,10 @@ void Colorbar::mapCmd(int id) void Colorbar::saveCmd(const char* fn) { - cmaps.current()->save(fn); + if (!cmaps.current()->save(fn)) { + Tcl_AppendResult(interp, " unable to save colormap: ", fn, NULL); + result = TCL_ERROR; + } } void Colorbar::saveCmd(int id, const char* fn) @@ -495,12 +498,16 @@ void Colorbar::saveCmd(int id, const char* fn) ColorMapInfo* ptr = cmaps.begin(); while (ptr) { if (ptr->getID() == id) { - ptr->save(fn); + if (!ptr->save(fn)) { + Tcl_AppendResult(interp, " unable to save colormap: ", fn, NULL); + result = TCL_ERROR; + } return; } ptr = ptr->next(); } + Tcl_AppendResult(interp, " unable to save colormap: ", fn, NULL); result = TCL_ERROR; } |