diff --git a/src/Charts/RideMapWindow.cpp b/src/Charts/RideMapWindow.cpp index 66e8497ca..284bcee1a 100644 --- a/src/Charts/RideMapWindow.cpp +++ b/src/Charts/RideMapWindow.cpp @@ -226,7 +226,7 @@ void RideMapWindow::osmCustomTSURLTextChanged(QString text) { if (first) { - if (tileCombo->currentData().toInt() == 1000 && (text.length() > 0)) { + if (tileCombo->itemData(tileCombo->currentIndex()).toInt() == 1000 && (text.length() > 0)) { osmCurrentTileServerUrl = text; // only do this once when the text is set automatically by properties first = false; diff --git a/src/Charts/RideMapWindow.h b/src/Charts/RideMapWindow.h index b55ecd1cc..d0df6540a 100644 --- a/src/Charts/RideMapWindow.h +++ b/src/Charts/RideMapWindow.h @@ -150,7 +150,7 @@ class RideMapWindow : public GcChartWindow bool showMarkers() const { return ( showMarkersCk->checkState() == Qt::Checked); } void setShowMarkers(bool x) { if (x) showMarkersCk->setCheckState(Qt::Checked); else showMarkersCk->setCheckState(Qt::Unchecked) ;} - int osmTS() const { return ( tileCombo->currentData().toInt()); } + int osmTS() const { return ( tileCombo->itemData(tileCombo->currentIndex()).toInt()); } void setOsmTS(int x) { tileCombo->setCurrentIndex(tileCombo->findData(x)); /*setTileServerUrlForTileType(x);*/} QString osmTSUrl() const { return osmCustomTSUrl->text(); }