mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 22:30:06 +00:00
update to propery check if string is empty
This commit is contained in:
parent
0cfad82933
commit
3b8e0d8180
1 changed files with 2 additions and 2 deletions
|
|
@ -199,7 +199,7 @@ bool MarkerModel::setData(const QModelIndex& index,
|
||||||
QString str = value.toString();
|
QString str = value.toString();
|
||||||
bool ok;
|
bool ok;
|
||||||
double latitude = str.toDouble(&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;
|
markerInfo->latitude = latitude;
|
||||||
p->markerManager_->set_marker(index.row(), *markerInfo);
|
p->markerManager_->set_marker(index.row(), *markerInfo);
|
||||||
|
|
@ -214,7 +214,7 @@ bool MarkerModel::setData(const QModelIndex& index,
|
||||||
QString str = value.toString();
|
QString str = value.toString();
|
||||||
bool ok;
|
bool ok;
|
||||||
double longitude = str.toDouble(&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;
|
markerInfo->longitude = longitude;
|
||||||
p->markerManager_->set_marker(index.row(), *markerInfo);
|
p->markerManager_->set_marker(index.row(), *markerInfo);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue