added "new map" button
fixed minor model/logic issues
This commit is contained in:
@@ -185,12 +185,21 @@ void MapView3D::showFloorplan() {
|
||||
}
|
||||
|
||||
void MapView3D::showGrid() {
|
||||
|
||||
// delete the previous grid (if any)
|
||||
if (gridModel) {delete gridModel; gridModel = nullptr;}
|
||||
|
||||
// build a new model
|
||||
GridModel* gm = new GridModel();
|
||||
Floorplan::IndoorMap* im = getModel()->getMap();
|
||||
gm->rebuild(im);
|
||||
|
||||
// remember
|
||||
this->gridModel = gm;
|
||||
|
||||
// update UI
|
||||
update();
|
||||
|
||||
}
|
||||
|
||||
void MapView3D::draw() {
|
||||
|
||||
Reference in New Issue
Block a user