From 3b8e0d8180eb2362ccdb75f3d8d942c2a34395ea Mon Sep 17 00:00:00 2001 From: AdenKoperczak Date: Sun, 6 Oct 2024 12:55:21 -0400 Subject: [PATCH] update to propery check if string is empty --- scwx-qt/source/scwx/qt/model/marker_model.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scwx-qt/source/scwx/qt/model/marker_model.cpp b/scwx-qt/source/scwx/qt/model/marker_model.cpp index d5a4db1b..04a65623 100644 --- a/scwx-qt/source/scwx/qt/model/marker_model.cpp +++ b/scwx-qt/source/scwx/qt/model/marker_model.cpp @@ -199,7 +199,7 @@ bool MarkerModel::setData(const QModelIndex& index, QString str = value.toString(); bool ok; double latitude = str.toDouble(&ok); - if (ok && str.isEmpty() && -90 <= latitude && latitude <= 90) + if (!str.isEmpty() && ok && -90 <= latitude && latitude <= 90) { markerInfo->latitude = latitude; p->markerManager_->set_marker(index.row(), *markerInfo); @@ -214,7 +214,7 @@ bool MarkerModel::setData(const QModelIndex& index, QString str = value.toString(); bool ok; double longitude = str.toDouble(&ok); - if (str.isEmpty() && ok && -180 <= longitude && longitude <= 180) + if (!str.isEmpty() && ok && -180 <= longitude && longitude <= 180) { markerInfo->longitude = longitude; p->markerManager_->set_marker(index.row(), *markerInfo);