svg2png: only attempt to open automatically on os x, and do not return after first rendered

This commit is contained in:
Dane Springmeyer 2012-04-11 09:49:50 -07:00
parent 1941a700a4
commit b22d043d80

View file

@ -104,7 +104,6 @@ int main (int argc,char** argv)
{
std::string svg_name (*itr++);
boost::optional<mapnik::marker_ptr> 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<mapnik::image_data_32>(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";
}
}
}