Explorar o código

Manually enabling/disabling the accept button shouldn't

update the accept button state (Accept Button State).
Julien Finet %!s(int64=13) %!d(string=hai) anos
pai
achega
bfaa5c7363
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      Libs/Widgets/ctkFileDialog.cpp

+ 2 - 0
Libs/Widgets/ctkFileDialog.cpp

@@ -144,7 +144,9 @@ void ctkFileDialog::setAcceptButtonEnable(bool enable)
 {
   Q_D(ctkFileDialog);
   d->AcceptButtonEnable = enable;
+  d->IgnoreEvent = true;
   d->acceptButton()->setEnabled(d->AcceptButtonEnable && d->AcceptButtonState);
+  d->IgnoreEvent = false;
 }
 
 //------------------------------------------------------------------------------