summaryrefslogtreecommitdiffstats
path: root/desktop-widgets
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2019-04-25 13:09:11 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-05-11 12:35:11 -0700
commit4a61f155d3c7bfed7262884019f7bcf1f5b86376 (patch)
tree8b318e41a25eafe3d181c37f572351334850b66a /desktop-widgets
parente76298a8a7fbbd3ccc252bf7c4a904db7c3423d6 (diff)
downloadsubsurface-4a61f155d3c7bfed7262884019f7bcf1f5b86376.tar.gz
Cleanup: simplify DiveLocationLineEdit::showPopup()
DiveLocationLineEdit::showPopup() called the functions - fixPopupPosition() - proxy->invalidate() - proxy->sort(LocationInformationModel::NAME) - view->show() All these calls are redundant, as they are already performed by setTemporaryDiveSiteName(). Remove them. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'desktop-widgets')
-rw-r--r--desktop-widgets/locationinformation.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/desktop-widgets/locationinformation.cpp b/desktop-widgets/locationinformation.cpp
index 5872089a4..9f61459b6 100644
--- a/desktop-widgets/locationinformation.cpp
+++ b/desktop-widgets/locationinformation.cpp
@@ -575,13 +575,8 @@ void DiveLocationLineEdit::setCurrentDiveSite(struct dive *d)
void DiveLocationLineEdit::showPopup()
{
- fixPopupPosition();
- if (!view->isVisible()) {
+ if (!view->isVisible())
setTemporaryDiveSiteName(text());
- proxy->invalidate();
- proxy->sort(LocationInformationModel::NAME);
- view->show();
- }
}
DiveLocationLineEdit::DiveSiteType DiveLocationLineEdit::currDiveSiteType() const