+ tidy
+ zoom_all on startup
This commit is contained in:
parent
c8ca617832
commit
a42f3d7265
2 changed files with 12 additions and 9 deletions
|
@ -169,8 +169,11 @@ void MainWindow::load_map_file(QString const& filename)
|
||||||
unsigned height = mapWidget_->height();
|
unsigned height = mapWidget_->height();
|
||||||
boost::shared_ptr<mapnik::Map> map(new mapnik::Map(width,height));
|
boost::shared_ptr<mapnik::Map> map(new mapnik::Map(width,height));
|
||||||
mapnik::load_map(*map,filename.toStdString());
|
mapnik::load_map(*map,filename.toStdString());
|
||||||
|
|
||||||
mapWidget_->setMap(map);
|
mapWidget_->setMap(map);
|
||||||
mapWidget_->zoomToBox(default_extent_);
|
map->zoom_all();
|
||||||
|
mapnik::box2d<double> const& ext = map->getCurrentExtent();
|
||||||
|
mapWidget_->zoomToBox(ext);
|
||||||
layerTab_->setModel(new LayerListModel(map,this));
|
layerTab_->setModel(new LayerListModel(map,this));
|
||||||
styleTab_->setModel(new StyleModel(map,this));
|
styleTab_->setModel(new StyleModel(map,this));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue