From 085de2825a72588af14e3d46db16aec6caed88e4 Mon Sep 17 00:00:00 2001 From: Camila San Date: Sun, 19 Aug 2018 13:06:48 +0200 Subject: [PATCH] Enhancement #534: hide tool button when there is no share link. - Only display button when there is a share link. Signed-off-by: Camila San --- src/gui/sharelinkwidget.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/gui/sharelinkwidget.cpp b/src/gui/sharelinkwidget.cpp index ae0d50e54..2e11fb43b 100644 --- a/src/gui/sharelinkwidget.cpp +++ b/src/gui/sharelinkwidget.cpp @@ -58,6 +58,7 @@ ShareLinkWidget::ShareLinkWidget(AccountPtr account, , _unshareLinkAction(nullptr) { _ui->setupUi(this); + _ui->shareLinkToolButton->hide(); //Is this a file or folder? QFileInfo fi(localPath); @@ -265,6 +266,9 @@ void ShareLinkWidget::slotSharesFetched(const QList> &shar _ui->shareLinkToolButton->setEnabled(true); _ui->enableShareLink->setEnabled(true); _ui->enableShareLink->setChecked(true); + + // show sharing options + _ui->shareLinkToolButton->show(); } } @@ -411,6 +415,7 @@ void ShareLinkWidget::slotDeleteShareFetched() _linkShare.clear(); _ui->enableShareLink->setChecked(false); _ui->shareLinkToolButton->setEnabled(false); + _ui->shareLinkToolButton->hide(); getShares(); }