Commit a0ab8f79 authored by Valentin Platzgummer's avatar Valentin Platzgummer

mimor changes

parent 6d21e26c
...@@ -223,7 +223,6 @@ FlightMap { ...@@ -223,7 +223,6 @@ FlightMap {
coordList.push(vertex) coordList.push(vertex)
} }
} }
console.log(coordList)
fitMapViewportToAllCoordinates(coordList) fitMapViewportToAllCoordinates(coordList)
} }
} }
......
...@@ -69,6 +69,8 @@ WimaPlaner::WimaPlaner(QObject *parent) ...@@ -69,6 +69,8 @@ WimaPlaner::WimaPlaner(QObject *parent)
&WimaPlaner::needsUpdateChanged); &WimaPlaner::needsUpdateChanged);
connect(this->_stateMachine.get(), &StateMachine::surveyReadyChanged, this, connect(this->_stateMachine.get(), &StateMachine::surveyReadyChanged, this,
&WimaPlaner::readyForSynchronizationChanged); &WimaPlaner::readyForSynchronizationChanged);
connect(this->_stateMachine.get(), &StateMachine::surveyReadyChanged, this,
&WimaPlaner::surveyReadyChanged);
} }
WimaPlaner::~WimaPlaner() {} WimaPlaner::~WimaPlaner() {}
...@@ -158,6 +160,8 @@ bool WimaPlaner::readyForSynchronization() { ...@@ -158,6 +160,8 @@ bool WimaPlaner::readyForSynchronization() {
return this->_stateMachine->surveyReady(); return this->_stateMachine->surveyReady();
} }
bool WimaPlaner::surveyReady() { return this->_stateMachine->surveyReady(); }
bool WimaPlaner::progressLocked() { return this->_progressLocked; } bool WimaPlaner::progressLocked() { return this->_progressLocked; }
void WimaPlaner::removeArea(int index) { void WimaPlaner::removeArea(int index) {
......
...@@ -55,6 +55,7 @@ public: ...@@ -55,6 +55,7 @@ public:
Q_PROPERTY(bool needsUpdate READ needsUpdate NOTIFY needsUpdateChanged) Q_PROPERTY(bool needsUpdate READ needsUpdate NOTIFY needsUpdateChanged)
Q_PROPERTY(bool readyForSynchronization READ readyForSynchronization NOTIFY Q_PROPERTY(bool readyForSynchronization READ readyForSynchronization NOTIFY
readyForSynchronizationChanged) readyForSynchronizationChanged)
Q_PROPERTY(bool surveyReady READ surveyReady NOTIFY surveyReadyChanged)
Q_PROPERTY(bool progressLocked READ progressLocked WRITE setProgressLocked Q_PROPERTY(bool progressLocked READ progressLocked WRITE setProgressLocked
NOTIFY progressLockedChanged) NOTIFY progressLockedChanged)
...@@ -72,6 +73,7 @@ public: ...@@ -72,6 +73,7 @@ public:
bool synchronized(); bool synchronized();
bool needsUpdate(); bool needsUpdate();
bool readyForSynchronization(); bool readyForSynchronization();
bool surveyReady();
bool progressLocked(); bool progressLocked();
// Property setters // Property setters
...@@ -118,6 +120,7 @@ signals: ...@@ -118,6 +120,7 @@ signals:
void synchronizedChanged(void); void synchronizedChanged(void);
void needsUpdateChanged(void); void needsUpdateChanged(void);
void readyForSynchronizationChanged(void); void readyForSynchronizationChanged(void);
void surveyReadyChanged(void);
void progressLockedChanged(); void progressLockedChanged();
private slots: private slots:
......
...@@ -439,7 +439,7 @@ QGCView { ...@@ -439,7 +439,7 @@ QGCView {
onAcceptedForLoad: { onAcceptedForLoad: {
wimaPlaner.loadFromFile(file) wimaPlaner.loadFromFile(file)
editorMap.center = wimaPlaner.joinedAreaCenter; mapFitFunctions.fitMapViewportToAreas()
close() close()
} }
} }
...@@ -637,23 +637,6 @@ QGCView { ...@@ -637,23 +637,6 @@ QGCView {
z: QGroundControl.zOrderMapItems - 1 z: QGroundControl.zOrderMapItems - 1
} }
} }
/*
GeoFenceMapVisuals {
map: editorMap
myGeoFenceController: _geoFenceController
interactive: _editingLayer == _layerGeoFence
homePosition: _missionController.plannedHomePosition
planView: true
}
RallyPointMapVisuals {
map: editorMap
myRallyPointController: _rallyPointController
interactive: _editingLayer == _layerRallyPoints
planView: true
}*/
// Airspace overlap support // Airspace overlap support
MapItemView { MapItemView {
model: _airspaceEnabled && QGroundControl.airspaceManager.airspaceVisible ? QGroundControl.airspaceManager.airspaces.circles : [] model: _airspaceEnabled && QGroundControl.airspaceManager.airspaceVisible ? QGroundControl.airspaceManager.airspaces.circles : []
...@@ -983,7 +966,7 @@ QGCView { ...@@ -983,7 +966,7 @@ QGCView {
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
onCheckedChanged:{ onCheckedChanged:{
if (!checked){ if (!checked && !wimaPlaner.surveyReady){
wimaPlaner.update() wimaPlaner.update()
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment