Explorar el Código

Don't reopen the popup when un-pin-ing the widget

Julien Finet hace 14 años
padre
commit
cd9ce0bb4a
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      Libs/Widgets/ctkPopupWidget.cpp

+ 2 - 2
Libs/Widgets/ctkPopupWidget.cpp

@@ -508,8 +508,8 @@ void ctkPopupWidget::updatePopup()
   QWidget* mouseOver = (d->AutoShow || d->AutoHide) ? d->mouseOver() : 0;
   QWidget* mouseOver = (d->AutoShow || d->AutoHide) ? d->mouseOver() : 0;
   if ((d->AutoShow ||
   if ((d->AutoShow ||
      // Even if there is no AutoShow, we might still want to reopen the popup
      // Even if there is no AutoShow, we might still want to reopen the popup
-     // when closing it inadvertently
-       (d->AutoHide && d->isClosing())) &&
+     // when closing it inadvertently, except if we are un-pin-ing the popup
+      (d->AutoHide && d->isClosing() && this->property("AutoShowOnClose").toBool())) &&
      // to be automatically open, the mouse has to be over a child widget
      // to be automatically open, the mouse has to be over a child widget
       mouseOver &&
       mouseOver &&
      // disable opening the popup when the popup is disabled
      // disable opening the popup when the popup is disabled