diff --git a/c++/main.cpp b/c++/main.cpp index 9421885f8a1f1f914a55bc8da5488b39dd01ddea..64b23613d9a29ccf14ebaba586fb97642ed56194 100644 --- a/c++/main.cpp +++ b/c++/main.cpp @@ -22,6 +22,7 @@ QString getFileUrlRelativeToExecutable(const QString &relativeFilePath) { int main(int argc, char *argv[]) { QGuiApplication gui_app(argc, argv); + QQmlApplicationEngine engine; // Check if TIFF format is supported QStringList supportedFormats; @@ -33,8 +34,6 @@ int main(int argc, char *argv[]) return -1; } - QQmlApplicationEngine engine; - QString mapImagePath = getFileUrlRelativeToExecutable("../../data/regions/jena-small/landcover.tif"); engine.rootContext()->setContextProperty("mapImagePath", mapImagePath); diff --git a/c++/main.qml b/c++/main.qml index 27afbbb8da3c1740eab29950fcf0f4ec5c8a72a6..bd5da17809101820a01f6965f3a837e9158925ac 100644 --- a/c++/main.qml +++ b/c++/main.qml @@ -14,7 +14,7 @@ ApplicationWindow { // these are the coordinates of the map image property var mapCoords: ({ x: 0, y: 0, width: 0, height: 0 }) - // calculate imgCoords of an Image + // calculate the visible coordinates of an Image function calculateVisibleGeometry(img) { var containerWidth = img.width; var containerHeight = img.height;