summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralex <axd1967@users.noreply.github.com>2021-10-08 20:20:09 +0200
committerGitHub <noreply@github.com>2021-10-09 01:20:09 +0700
commit9a46bfc4240fb950ae4652a01868b26df76428f8 (patch)
treececeadd0e7ab17222b11c400e4b7fd68b95f56e3
parent4d52c0bcec2202b454219567e906a2d2380fa777 (diff)
sat plugin: also search descriptions (#1940)skyculture/russian
-rw-r--r--plugins/Satellites/src/SatellitesListFilterModel.cpp6
-rw-r--r--plugins/Satellites/src/gui/satellitesDialog.ui2
2 files changed, 7 insertions, 1 deletions
diff --git a/plugins/Satellites/src/SatellitesListFilterModel.cpp b/plugins/Satellites/src/SatellitesListFilterModel.cpp
index a911e8104b..8646304291 100644
--- a/plugins/Satellites/src/SatellitesListFilterModel.cpp
+++ b/plugins/Satellites/src/SatellitesListFilterModel.cpp
@@ -74,6 +74,12 @@ bool SatellitesListFilterModel::filterAcceptsRow(int source_row, const QModelInd
QString id = data.toString();
if (id.contains(filterRegExp()))
return true;
+
+ // search descriptions
+ data = index.data(SatDescriptionRole);
+ QString descr = data.toString();
+ if (descr.contains(filterRegExp()))
+ return true;
// TODO: Possible check for "NORAD NNNN".
return false;
diff --git a/plugins/Satellites/src/gui/satellitesDialog.ui b/plugins/Satellites/src/gui/satellitesDialog.ui
index da0ff3f6d5..c8a68132f6 100644
--- a/plugins/Satellites/src/gui/satellitesDialog.ui
+++ b/plugins/Satellites/src/gui/satellitesDialog.ui
@@ -762,7 +762,7 @@
<item>
<widget class="QLineEdit" name="lineEditSearch">
<property name="placeholderText">
- <string>Search in list...</string>
+ <string>Search ...</string>
</property>
</widget>
</item>