Fixed and simpliflied the code that handle the click on dock palette

preferencesAboutTextFull
Claudio Valerio 13 years ago
parent 514c84482c
commit 74b53f64f7
  1. 12
      src/gui/UBDockPalette.cpp

@ -744,16 +744,6 @@ void UBTabDockPalette::mouseReleaseEvent(QMouseEvent *event)
int clickedTab = 0;
// If the clicked position is in the tab, perform the related action
if(eUBDockOrientation_Left == dock->mOrientation) {
if(dock->mMousePressPos.y() >= dock->mHTab &&
dock->mMousePressPos.x() <= width() &&
dock->mMousePressPos.y() <= dock->mHTab + nbTabs * TABSIZE + (nbTabs -1)*dock->tabSpacing()) {
clickedTab = (dock->mMousePressPos.y() - dock->mHTab) / (TABSIZE + dock->tabSpacing());
dock->tabClicked(clickedTab);
}
} else if (eUBDockOrientation_Right == dock->mOrientation) {
if(dock->mMousePressPos.x() >= 0 &&
dock->mMousePressPos.x() <= width() &&
dock->mMousePressPos.y() >= 0 &&
@ -763,7 +753,5 @@ void UBTabDockPalette::mouseReleaseEvent(QMouseEvent *event)
dock->tabClicked(clickedTab);
}
}
}
dock->mCanResize = false;
}

Loading…
Cancel
Save