Browse Source

Fix warnings in ctk[Base]PopupWidget, add parenthesis and switch case

Julien Finet 13 years ago
parent
commit
614fde917f
2 changed files with 4 additions and 1 deletions
  1. 3 0
      Libs/Widgets/ctkBasePopupWidget.cpp
  2. 1 1
      Libs/Widgets/ctkPopupWidget.cpp

+ 3 - 0
Libs/Widgets/ctkBasePopupWidget.cpp

@@ -632,8 +632,11 @@ bool ctkBasePopupWidget::event(QEvent* event)
   switch(event->type())
     {
     case QEvent::ParentChange:
+      // For now the base widget is the parent widget
       this->setBaseWidget(this->parentWidget());
       break;
+    default:
+      break;
     }
   return this->Superclass::event(event);
 }

+ 1 - 1
Libs/Widgets/ctkPopupWidget.cpp

@@ -482,7 +482,7 @@ void ctkPopupWidget::updatePopup()
   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()) &&
+       (d->AutoHide && d->isClosing())) &&
      // to be automatically open, the mouse has to be over a child widget
       mouseOver &&
      // disable opening the popup when the popup is disabled