From: James Turner Date: Sat, 5 Mar 2016 09:34:16 +0000 (+0000) Subject: Bugfix: Qt launcher, enable variant aircraft on-disk X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=688ae7d15631241994efd21fec89a517d62f5cf7;p=flightgear.git 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. --- 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();