Share dialog: Remove unintended spinner when password required
authorChristian Kamm <mail@ckamm.de>
Tue, 19 Jan 2016 12:37:06 +0000 (13:37 +0100)
committerChristian Kamm <mail@ckamm.de>
Wed, 20 Jan 2016 08:49:10 +0000 (09:49 +0100)
src/gui/sharelinkwidget.cpp

index a8a3e2d80bec16e58172a2a79a1ba8e5762a7f46..c5c5b0c30104ea180a755fa8d74afcfec0e5b3a9 100644 (file)
@@ -358,14 +358,11 @@ void ShareLinkWidget::slotCheckBoxShareLinkClicked()
 {
     qDebug() << Q_FUNC_INFO <<( _ui->checkBox_shareLink->checkState() == Qt::Checked);
     if (_ui->checkBox_shareLink->checkState() == Qt::Checked) {
-        _pi_link->startAnimation();
-
         /*
          * Check the capabilities if the server requires a password for a share
          * Ask for it directly
          */
         if (_account->capabilities().sharePublicLinkEnforcePassword()) {
-            _pi_link->stopAnimation();
             _ui->checkBox_password->setChecked(true);
             _ui->checkBox_password->setEnabled(false);
             _ui->checkBox_password->setText(tr("Public sh&aring requires a password"));
@@ -379,6 +376,7 @@ void ShareLinkWidget::slotCheckBoxShareLinkClicked()
             return;
         }
 
+        _pi_link->startAnimation();
         _ui->checkBox_shareLink->setEnabled(false);
         _manager->createLinkShare(_sharePath);
     } else {