From 688ae7d15631241994efd21fec89a517d62f5cf7 Mon Sep 17 00:00:00 2001 From: James Turner Date: Sat, 5 Mar 2016 09:34:16 +0000 Subject: [PATCH] Bugfix: Qt launcher, enable variant aircraft on-disk When mapping a URI to a QModelIndex, we were only considering the primary aircraft path, for on-disk aircraft as opposed to packages. --- src/GUI/AircraftModel.cxx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/GUI/AircraftModel.cxx b/src/GUI/AircraftModel.cxx index 2871da8e0..16e015c7c 100644 --- a/src/GUI/AircraftModel.cxx +++ b/src/GUI/AircraftModel.cxx @@ -756,6 +756,13 @@ QModelIndex AircraftItemModel::indexOfAircraftURI(QUrl uri) const if (item->path == path) { return index(row); } + + // check variants too + for (int vr=0; vr < item->variants.size(); ++vr) { + if (item->variants.at(vr)->path == path) { + return index(row); + } + } } } else if (uri.scheme() == "package") { QString ident = uri.path(); -- 2.39.5