From b22d043d807e71086af3823dcefa7925f2dd924d Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Wed, 11 Apr 2012 09:49:50 -0700 Subject: [PATCH] svg2png: only attempt to open automatically on os x, and do not return after first rendered --- utils/svg2png/svg2png.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/utils/svg2png/svg2png.cpp b/utils/svg2png/svg2png.cpp index 896d6e01c..9df2b3141 100644 --- a/utils/svg2png/svg2png.cpp +++ b/utils/svg2png/svg2png.cpp @@ -104,7 +104,6 @@ int main (int argc,char** argv) { std::string svg_name (*itr++); - boost::optional marker_ptr = mapnik::marker_cache::instance()->find(svg_name, false); if (marker_ptr) { @@ -147,9 +146,12 @@ int main (int argc,char** argv) boost::algorithm::ireplace_last(svg_name,".svg",".png"); mapnik::save_to_file(im.data(),svg_name,"png"); +#ifdef DARWIN std::ostringstream s; s << "open " << svg_name; - return system(s.str().c_str()); + system(s.str().c_str()); +#endif + std::clog << "rendered to: " << svg_name << "\n"; } } }