Skip to content

Commit c25ab96

Browse files
committed
Fix problem renaming visual approach charts.
1 parent bc473e2 commit c25ab96

File tree

6 files changed

+12
-7
lines changed

6 files changed

+12
-7
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
### Fixed
66
- Fix unexpected exit when editing flight routes. (#526)
77

8+
- Fix problem renaming visual approach charts.
9+
810

911
## [2.33.3] - 2025-05-10
1012

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ option(QTDEPLOY "Generate and run Qt deployment scripts" OFF)
1414
# Project data
1515
#
1616

17-
project(enroute VERSION 2.33.3)
17+
project(enroute VERSION 2.33.4)
1818
set(APP_ID de.akaflieg_freiburg.enroute)
1919
set(DISPLAY_NAME "Enroute")
2020
math(EXPR PROJECT_VERSION_CODE 10000*${PROJECT_VERSION_MAJOR}+100*${PROJECT_VERSION_MINOR}+${PROJECT_VERSION_PATCH})

src/geomaps/VACLibrary.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ QString GeoMaps::VACLibrary::rename(const QString& oldName, const QString& newNa
252252
}
253253

254254
// Rename raster image file
255-
auto newFileName = absolutePathForVac(vac);
255+
auto newFileName = absolutePathForVac(newName);
256256
if (!QFile::rename(vac.fileName, newFileName))
257257
{
258258
return tr("VAC file renaming failed.");
@@ -413,5 +413,10 @@ void GeoMaps::VACLibrary::save()
413413

414414
QString GeoMaps::VACLibrary::absolutePathForVac(GeoMaps::VAC vac)
415415
{
416-
return m_vacDirectory + "/" + vac.name + ".webp";
416+
return absolutePathForVac(vac.name);
417+
}
418+
419+
QString GeoMaps::VACLibrary::absolutePathForVac(const QString& name)
420+
{
421+
return m_vacDirectory + "/" + name + ".webp";
417422
}

src/geomaps/VACLibrary.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@ class VACLibrary : public QObject
194194
// This method returns the absolute path of a given VAC. Needed for iOS
195195
// after App Update. See GeoMaps::VACLibrary::janitor
196196
QString absolutePathForVac(GeoMaps::VAC);
197+
QString absolutePathForVac(const QString& name);
197198

198199
QVector<GeoMaps::VAC> m_vacs;
199200
QString m_vacDirectory {QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + "/VAC"};

src/qml/dialogs/FlightRouteSaveDialog.qml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,6 @@ CenteringDialog {
4141
text: modelData
4242
icon.source: "/icons/material/ic_directions.svg"
4343

44-
anchors.left: parent.left
45-
anchors.right: parent.right
46-
4744
onClicked: {
4845
PlatformAdaptor.vibrateBrief()
4946
finalFileName = modelData

src/qml/dialogs/RenameVACDialog.qml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ CenteringDialog {
5353
text: renameDialog.oldName
5454
implicitWidth: renameDialog.availableWidth
5555

56-
onAccepted: renameDialog.onAccepted()
56+
onAccepted: renameDialog.accept()
5757
}
5858
}
5959

0 commit comments

Comments
 (0)