diff --git a/CHANGELOG.txt b/CHANGELOG.txt index d75bb97b..ba07a1df 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -29,6 +29,8 @@ This text is partially Markdown, hence sometimes strange formatting. * Fixed wrong calculation for airport rating which did not update add-on airports. * Deleting duplicate navaids now by region, ident and position now. * Fixed issue where widget state could not find saved dialog state. +* Wrongly built airports like the MS MKJS now keep their procedure information in MSFS despite + trying to override it with an empty procedure set. #1085 =============================================================================== diff --git a/src/fs/db/ap/deleteprocessor.cpp b/src/fs/db/ap/deleteprocessor.cpp index d3f87a6c..bacf7112 100644 --- a/src/fs/db/ap/deleteprocessor.cpp +++ b/src/fs/db/ap/deleteprocessor.cpp @@ -219,19 +219,6 @@ void DeleteProcessor::preProcessDelete() // Get facility counts for current airport extractPreviousAirportFeatures(); - // Delete the whole tree of approaches, transitions and legs on the old airport later in - // ":/atools/resources/sql/fs/db/delete_duplicates.sql" - - // if(prevHasApproach && isFlagSet(deleteFlags, bgl::del::APPROACHES)) - // { - // SqlUtil sql(db); - // sql.bindAndExec("delete from transition where transition.approach_id in " - // "(select a.approach_id from approach a where a.airport_id = :prevApId)", - // ":prevApId", prevAirportId); - // sql.bindAndExec("delete from approach where airport_id = :prevApId", - // ":prevApId", prevAirportId); - // } - // ILS will be deleted later by deduplication } @@ -596,12 +583,13 @@ void DeleteProcessor::extractDeleteFlags() // qDebug() << "processDelete Made up flags" << deleteFlags; } + // Do not delete anything if the new airport has no corresponding features + // Also do this as a workaround for MSFS airports like MKJS_Scene.bgl + if(curAirport->getApproaches().isEmpty()) + deleteFlags &= ~bgl::del::APPROACHES; + if(options.getSimulatorType() != atools::fs::FsPaths::MSFS) { - // Do not delete anything if the new airport has no corresponding features - if(curAirport->getApproaches().isEmpty()) - deleteFlags &= ~bgl::del::APPROACHES; - // if(newAirport->getAprons().isEmpty()) // deleteFlags &= ~bgl::del::APRONS; diff --git a/src/fs/db/ap/deleteprocessor.h b/src/fs/db/ap/deleteprocessor.h index a018abea..d612aa7c 100644 --- a/src/fs/db/ap/deleteprocessor.h +++ b/src/fs/db/ap/deleteprocessor.h @@ -1,5 +1,5 @@ /***************************************************************************** -* Copyright 2015-2023 Alexander Barthel alex@littlenavmap.org +* Copyright 2015-2024 Alexander Barthel alex@littlenavmap.org * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by