preferencesAboutTextFull
shibakaneki 13 years ago
parent 742558d41e
commit d6be19a23c
  1. 22
      src/customWidgets/UBWidgetList.cpp

@ -143,28 +143,15 @@ void UBWidgetList::mousePressEvent(QMouseEvent *ev)
if(mCanRemove){ if(mCanRemove){
QWidget* pWAt = widgetAt(ev->pos()); QWidget* pWAt = widgetAt(ev->pos());
if(NULL != mpCurrentWidget){ if(NULL != mpCurrentWidget){
if(pWAt == mpCurrentWidget){ if(pWAt != mpCurrentWidget){
// qDebug() << ev->x() << "," << ev->y();
// qDebug() << "mpCurrentWidget->pos() = " << mpCurrentWidget->pos().x() << "," << mpCurrentWidget->pos().y();
// qDebug() << "viewport position: " << visibleRegion().boundingRect().x() << "," << visibleRegion().boundingRect().y();
// QPoint p;
// p.setX(ev->x() - mpCurrentWidget->pos().x());
// p.setY(ev->y() - mpCurrentWidget->pos().y());
// if(mpCurrentWidget->shouldClose(p)){
// emit closeWidget(mpCurrentWidget);
// return;
// }
}else{
mpCurrentWidget->setActionsVisible(false); mpCurrentWidget->setActionsVisible(false);
update();
} }
} }
mpCurrentWidget = dynamic_cast<UBActionableWidget*>(pWAt); mpCurrentWidget = dynamic_cast<UBActionableWidget*>(pWAt);
if(NULL != mpCurrentWidget){ if(NULL != mpCurrentWidget){
mpCurrentWidget->setActionsVisible(true); mpCurrentWidget->setActionsVisible(true);
update();
} }
} }
update(); update();
@ -240,6 +227,3 @@ bool UBWidgetList::empty()
{ {
return mWidgetInfo.empty(); return mWidgetInfo.empty();
} }
// TODO : - add onHover 'delete' button

Loading…
Cancel
Save