浏览代码

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

Julien Finet 13 年之前
父节点
当前提交
cd9ce0bb4a
共有 1 个文件被更改,包括 2 次插入2 次删除
  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;
   if ((d->AutoShow ||
      // 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
       mouseOver &&
      // disable opening the popup when the popup is disabled