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,
bool MeasurementArea::isCorrect() {
if (GeoArea::isCorrect()) {
if (ready()) {
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) {
setErrorString(
tr("Calculation would yield to many tiles, please adjust the tile "
......@@ -627,8 +633,10 @@ bool getTiles(const FPolygon &area, Length tileHeight, Length tileWidth,
minimalBoundingBox(area, bbox);
}
if (bbox.corners.outer().size() < 5)
if (bbox.corners.outer().size() < 5) {
return false;
}
double bboxWidth = bbox.width;
double bboxHeight = bbox.height;
FPoint origin = bbox.corners.outer()[0];
......
......@@ -218,8 +218,8 @@ Rectangle {
wrapMode: Text.WordWrap
horizontalAlignment: Text.AlignLeft
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 Abort button to reset the areas and leave the tab.")
Use the Reset button to restore the areas to the state before entering this tab."
)
Layout.fillWidth: true
Layout.columnSpan: parent.columns
}
......
......@@ -43,6 +43,7 @@ Rectangle {
anchors.top: parent.top
anchors.left: parent.left
anchors.right: parent.right
spacing: _margin
QGCTabBar {
id: tabBar
......@@ -78,11 +79,6 @@ Rectangle {
visible: tabBar.currentIndex === tabBar.areaEditorIndex
missionItem: _root._missionItem
availableWidth: mainColumn.width
onVisibleChanged:{
if (visible){
_missionItem.startEditing()
}
}
}
MCI.ParameterEditor {
......
......@@ -179,7 +179,7 @@ Rectangle {
id: hintLabel
wrapMode: Text.WordWrap
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.")
Layout.fillWidth: true
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