diff options
Diffstat (limited to 'tksao/frame/wcsast.C')
-rw-r--r-- | tksao/frame/wcsast.C | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tksao/frame/wcsast.C b/tksao/frame/wcsast.C index de5c3a6..18d930b 100644 --- a/tksao/frame/wcsast.C +++ b/tksao/frame/wcsast.C @@ -56,6 +56,15 @@ int wcsSkyFrame(AstFrameSet* ast, Coord::SkyFrame sky) void wcsFormat(AstFrameSet* ast, int id, const char* format) { + // is it already set? + // ast is very slow when changing params + { + ostringstream str; + str << "Format(" << id << ")" << ends; + const char* out = astGetC(ast, str.str().c_str()); + if (!strcmp(out,format)) + return; + } ostringstream str; str << "Format(" << id << ")=" << format << ends; astSet(ast, str.str().c_str()); |