Commit a0ab8f79 authored by Valentin Platzgummer's avatar Valentin Platzgummer

mimor changes

parent 6d21e26c
......@@ -223,7 +223,6 @@ FlightMap {
coordList.push(vertex)
}
}
console.log(coordList)
fitMapViewportToAllCoordinates(coordList)
}
}
......
......@@ -69,6 +69,8 @@ WimaPlaner::WimaPlaner(QObject *parent)
&WimaPlaner::needsUpdateChanged);
connect(this->_stateMachine.get(), &StateMachine::surveyReadyChanged, this,
&WimaPlaner::readyForSynchronizationChanged);
connect(this->_stateMachine.get(), &StateMachine::surveyReadyChanged, this,
&WimaPlaner::surveyReadyChanged);
}
WimaPlaner::~WimaPlaner() {}
......@@ -158,6 +160,8 @@ bool WimaPlaner::readyForSynchronization() {
return this->_stateMachine->surveyReady();
}
bool WimaPlaner::surveyReady() { return this->_stateMachine->surveyReady(); }
bool WimaPlaner::progressLocked() { return this->_progressLocked; }
void WimaPlaner::removeArea(int index) {
......
......@@ -55,6 +55,7 @@ public:
Q_PROPERTY(bool needsUpdate READ needsUpdate NOTIFY needsUpdateChanged)
Q_PROPERTY(bool readyForSynchronization READ readyForSynchronization NOTIFY
readyForSynchronizationChanged)
Q_PROPERTY(bool surveyReady READ surveyReady NOTIFY surveyReadyChanged)
Q_PROPERTY(bool progressLocked READ progressLocked WRITE setProgressLocked
NOTIFY progressLockedChanged)
......@@ -72,6 +73,7 @@ public:
bool synchronized();
bool needsUpdate();
bool readyForSynchronization();
bool surveyReady();
bool progressLocked();
// Property setters
......@@ -118,6 +120,7 @@ signals:
void synchronizedChanged(void);
void needsUpdateChanged(void);
void readyForSynchronizationChanged(void);
void surveyReadyChanged(void);
void progressLockedChanged();
private slots:
......
......@@ -439,7 +439,7 @@ QGCView {
onAcceptedForLoad: {
wimaPlaner.loadFromFile(file)
editorMap.center = wimaPlaner.joinedAreaCenter;
mapFitFunctions.fitMapViewportToAreas()
close()
}
}
......@@ -637,23 +637,6 @@ QGCView {
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
MapItemView {
model: _airspaceEnabled && QGroundControl.airspaceManager.airspaceVisible ? QGroundControl.airspaceManager.airspaces.circles : []
......@@ -983,7 +966,7 @@ QGCView {
anchors.verticalCenter: parent.verticalCenter
onCheckedChanged:{
if (!checked){
if (!checked && !wimaPlaner.surveyReady){
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