Commit 13843641 authored by Valentin Platzgummer's avatar Valentin Platzgummer

0 tiles error message added

parent 0dd18040
...@@ -326,7 +326,13 @@ bool MeasurementArea::loadFromJson(const QJsonObject &json, ...@@ -326,7 +326,13 @@ bool MeasurementArea::loadFromJson(const QJsonObject &json,
bool MeasurementArea::isCorrect() { bool MeasurementArea::isCorrect() {
if (GeoArea::isCorrect()) { if (GeoArea::isCorrect()) {
if (ready()) { if (ready()) {
return true; if (_tiles->count() > 0) {
return true;
} else {
setErrorString(tr("Not able to create tiles. This indicates that the "
"tile parameters must be adjusted. Reducing the Min. "
"Area parameter might deliver the desired result."));
}
} else if (_toManyTiles) { } else if (_toManyTiles) {
setErrorString( setErrorString(
tr("Calculation would yield to many tiles, please adjust the tile " tr("Calculation would yield to many tiles, please adjust the tile "
...@@ -627,8 +633,10 @@ bool getTiles(const FPolygon &area, Length tileHeight, Length tileWidth, ...@@ -627,8 +633,10 @@ bool getTiles(const FPolygon &area, Length tileHeight, Length tileWidth,
minimalBoundingBox(area, bbox); minimalBoundingBox(area, bbox);
} }
if (bbox.corners.outer().size() < 5) if (bbox.corners.outer().size() < 5) {
return false; return false;
}
double bboxWidth = bbox.width; double bboxWidth = bbox.width;
double bboxHeight = bbox.height; double bboxHeight = bbox.height;
FPoint origin = bbox.corners.outer()[0]; FPoint origin = bbox.corners.outer()[0];
......
...@@ -218,8 +218,8 @@ Rectangle { ...@@ -218,8 +218,8 @@ Rectangle {
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
horizontalAlignment: Text.AlignLeft horizontalAlignment: Text.AlignLeft
text: qsTr("Use the Intersection button to clip the Measurement Area(s). text: qsTr("Use the Intersection button to clip the Measurement Area(s).
Use the Reset button to restore the areas to the state before entering this tab. Use the Reset button to restore the areas to the state before entering this tab."
Use the Abort button to reset the areas and leave the tab.") )
Layout.fillWidth: true Layout.fillWidth: true
Layout.columnSpan: parent.columns Layout.columnSpan: parent.columns
} }
......
...@@ -43,6 +43,7 @@ Rectangle { ...@@ -43,6 +43,7 @@ Rectangle {
anchors.top: parent.top anchors.top: parent.top
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
spacing: _margin
QGCTabBar { QGCTabBar {
id: tabBar id: tabBar
...@@ -78,11 +79,6 @@ Rectangle { ...@@ -78,11 +79,6 @@ Rectangle {
visible: tabBar.currentIndex === tabBar.areaEditorIndex visible: tabBar.currentIndex === tabBar.areaEditorIndex
missionItem: _root._missionItem missionItem: _root._missionItem
availableWidth: mainColumn.width availableWidth: mainColumn.width
onVisibleChanged:{
if (visible){
_missionItem.startEditing()
}
}
} }
MCI.ParameterEditor { MCI.ParameterEditor {
......
...@@ -179,7 +179,7 @@ Rectangle { ...@@ -179,7 +179,7 @@ Rectangle {
id: hintLabel id: hintLabel
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
horizontalAlignment: Text.AlignLeft horizontalAlignment: Text.AlignLeft
text: qsTr("Use this tab to connect to a device implementing the Nemo Interface. text: qsTr("Use this tab to connect to a device implementing the Nemointerface.
Use the Random button to simulate measurement progress.") Use the Random button to simulate measurement progress.")
Layout.fillWidth: true Layout.fillWidth: true
Layout.columnSpan: parent.columns Layout.columnSpan: parent.columns
......
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