added support for pillars

minor fixes
new 3D models
This commit is contained in:
2018-05-22 11:50:56 +02:00
parent 1bc95d9c55
commit 37b3011e5d
14 changed files with 352 additions and 77 deletions

View File

@@ -31,6 +31,7 @@
#include "../mapview/2D/tools/ToolNewBeacon.h"
#include "../mapview/2D/tools/ToolNewPOI.h"
#include "../mapview/2D/tools/ToolNewObject.h"
#include "../mapview/2D/tools/ToolNewPillar.h"
#include "../UIHelper.h"
@@ -188,6 +189,8 @@ void ToolBoxWidget::onMainToolChanged() {
btnObject->setStyleSheet( dynamic_cast<ToolNewWall*>(t) ? styleSel : styleNor );
btnElevator->setStyleSheet( dynamic_cast<ToolNewElevator*>(t) ? styleSel : styleNor );
btnStair->setStyleSheet( dynamic_cast<ToolNewStair*>(t) ? styleSel : styleNor );
btnPillar->setStyleSheet( dynamic_cast<ToolNewPillar*>(t) ? styleSel : styleNor );
btnFingerprintLocation->setStyleSheet( dynamic_cast<ToolNewFingerprint*>(t) ? styleSel : styleNor );
btnGTP->setStyleSheet( dynamic_cast<ToolNewGroundTruth*>(t) ? styleSel : styleNor );
@@ -268,21 +271,7 @@ void ToolBoxWidget::onNewObject() {
}
void ToolBoxWidget::onNewPillar() {
const Point2 center = view->getScaler().getCenter();
float s = view->getScaler().sm(50);
Floorplan::FloorObstacleCircle* pillar = new Floorplan::FloorObstacleCircle(
Floorplan::Material::DRYWALL,
Point2(center.x-s, center.y),
s
);
MMFloorObstacles* obs = (MMFloorObstacles*)curLayer;
obs->createCircle(pillar);
//view->getModel()->reselect();
view->getTools().setMain(new ToolNewPillar(view->getTools(), curLayer));
}