diff options
Diffstat (limited to 'desktop-widgets/locationinformation.cpp')
-rw-r--r-- | desktop-widgets/locationinformation.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/desktop-widgets/locationinformation.cpp b/desktop-widgets/locationinformation.cpp index 9f61459b6..dbbe9bf75 100644 --- a/desktop-widgets/locationinformation.cpp +++ b/desktop-widgets/locationinformation.cpp @@ -579,6 +579,20 @@ void DiveLocationLineEdit::showPopup() setTemporaryDiveSiteName(text()); } +void DiveLocationLineEdit::showAllSites() +{ + if (!view->isVisible()) { + // By setting the "temporary dive site name" to the empty string, + // all dive sites are shown sorted by distance from the site of + // the current dive. + setTemporaryDiveSiteName(QString()); + + // By selecting the whole text, the user can immediately start + // typing to activate the full-text filter. + selectAll(); + } +} + DiveLocationLineEdit::DiveSiteType DiveLocationLineEdit::currDiveSiteType() const { return currType; |