From 78c659ec8766cc53e940c77b2aa1c1be0c1e315e Mon Sep 17 00:00:00 2001 From: Automatic Release Builder Date: Sun, 4 Oct 2020 19:16:08 +0100 Subject: [PATCH] Launcher: fix some minor glitches in Aircraft list - updating of 'no results' box - sizing of the headers when empty - double-click to select of the search box when focused --- src/GUI/AircraftProxyModel.cxx | 4 +++- src/GUI/LauncherMainWindow.cxx | 3 ++- src/GUI/qml/AircraftList.qml | 4 ++-- src/GUI/qml/SearchButton.qml | 4 ++++ 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/GUI/AircraftProxyModel.cxx b/src/GUI/AircraftProxyModel.cxx index 86f199352..994712039 100644 --- a/src/GUI/AircraftProxyModel.cxx +++ b/src/GUI/AircraftProxyModel.cxx @@ -51,6 +51,7 @@ void AircraftProxyModel::setAircraftFilterString(QString s) } invalidate(); + emit countChanged(); } int AircraftProxyModel::indexForURI(QUrl uri) const @@ -79,6 +80,7 @@ void AircraftProxyModel::setRatingFilterEnabled(bool e) invalidate(); emit ratingsFilterEnabledChanged(); emit summaryTextChanged(); + emit countChanged(); } QString AircraftProxyModel::summaryText() const @@ -261,4 +263,4 @@ bool AircraftProxyModel::lessThan(const QModelIndex& left, const QModelIndex& ri } else { return c < 0; } -} \ No newline at end of file +} diff --git a/src/GUI/LauncherMainWindow.cxx b/src/GUI/LauncherMainWindow.cxx index 12db9fe09..22ed5bcee 100755 --- a/src/GUI/LauncherMainWindow.cxx +++ b/src/GUI/LauncherMainWindow.cxx @@ -18,11 +18,12 @@ // launcher headers #include "QtLauncher.hxx" +#include "AddOnsController.hxx" +#include "AircraftItemModel.hxx" #include "DefaultAircraftLocator.hxx" #include "LaunchConfig.hxx" #include "LocalAircraftCache.hxx" #include "LauncherController.hxx" -#include "AddOnsController.hxx" #include "LocationController.hxx" #include "UpdateChecker.hxx" diff --git a/src/GUI/qml/AircraftList.qml b/src/GUI/qml/AircraftList.qml index b8521b6e7..531d12342 100644 --- a/src/GUI/qml/AircraftList.qml +++ b/src/GUI/qml/AircraftList.qml @@ -149,7 +149,7 @@ FocusScope Rectangle { visible: _launcher.searchAircraftModel.count === 0 width: aircraftContent.width - height: Style.strutSize + height: visible ? Style.strutSize : 0 StyledText { anchors.fill: parent @@ -167,7 +167,7 @@ FocusScope Rectangle { visible: _launcher.favouriteAircraftModel.count === 0 width: aircraftContent.width - height: Style.strutSize + height: visible ? Style.strutSize : 0 StyledText { anchors.fill: parent diff --git a/src/GUI/qml/SearchButton.qml b/src/GUI/qml/SearchButton.qml index 7bf441b2f..6aad5a74a 100644 --- a/src/GUI/qml/SearchButton.qml +++ b/src/GUI/qml/SearchButton.qml @@ -105,6 +105,10 @@ FocusScope buttonText.selectAll(); } } + + onDoubleClicked: { + buttonText.selectAll(); + } }