From af08cd802c54638fca04ac9e752d0ee043458631 Mon Sep 17 00:00:00 2001 From: Matthias Kuehlewein Date: Sun, 8 Jun 2025 19:37:43 +0200 Subject: [PATCH] TemplateImage: Remove reference to world file Only mention world file in dialogs if template has a world file. --- src/templates/template_image.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/templates/template_image.cpp b/src/templates/template_image.cpp index 50d4c59fc6..eb24a7305e 100644 --- a/src/templates/template_image.cpp +++ b/src/templates/template_image.cpp @@ -1,6 +1,6 @@ /* * Copyright 2012, 2013 Thomas Schöps - * Copyright 2012-2020 Kai Pastor + * Copyright 2012-2020, 2025 Kai Pastor * * This file is part of OpenOrienteering. * @@ -297,13 +297,14 @@ bool TemplateImage::postLoadSetup(QWidget* dialog_parent, bool& out_center_in_vi if (map->getGeoreferencing().getState() == Georeferencing::Geospatial) { // Let user select the coordinate reference system. - // \todo Change description text below (no longer just for world files.) Q_UNUSED(QT_TR_NOOP("Select the coordinate reference system of the georeferenced image.")) SelectCRSDialog dialog( available_georef, map->getGeoreferencing(), dialog_parent, - tr("Select the coordinate reference system of the coordinates in the world file") ); + available_georef.effective.transform.source == QByteArray("World file") ? + tr("Select the coordinate reference system of the coordinates in the world file") : + tr("Select the coordinate reference system") ); if (dialog.exec() == QDialog::Accepted) { available_georef.effective.crs_spec = dialog.currentCRSSpec(); @@ -417,13 +418,14 @@ bool TemplateImage::trySetTemplateGeoreferenced(bool value, QWidget* dialog_pare { // Cf. postLoadSetup // Let user select the coordinate reference system. - // \todo Change description text below (no longer just for world files.) Q_UNUSED(QT_TR_NOOP("Select the coordinate reference system of the georeferenced image.")) SelectCRSDialog dialog( available_georef, map->getGeoreferencing(), dialog_parent, - tr("Select the coordinate reference system of the coordinates in the world file") ); + available_georef.effective.transform.source == QByteArray("World file") ? + tr("Select the coordinate reference system of the coordinates in the world file") : + tr("Select the coordinate reference system") ); if (dialog.exec() == QDialog::Rejected) return true; // not failed!