fixed some bad behaviors on thumbnail views + deactivated moveDown and moveUp icons

preferencesAboutTextFull
Clément Fauconnier 7 years ago
parent cb2c435a61
commit 746382ef79
  1. 7
      src/gui/UBBoardThumbnailsView.cpp
  2. 12
      src/gui/UBThumbnailWidget.cpp

@ -186,12 +186,17 @@ void UBBoardThumbnailsView::mousePressEvent(QMouseEvent *event)
{
mLongPressTimer.start();
mLastPressedMousePos = event->pos();
UBDraggableThumbnailView* item = dynamic_cast<UBDraggableThumbnailView*>(itemAt(event->pos()));
if (item)
UBApplication::boardController->setActiveDocumentScene(item->sceneIndex());
QGraphicsView::mousePressEvent(event);
}
void UBBoardThumbnailsView::mouseMoveEvent(QMouseEvent *event)
{
mLastPressedMousePos = event->pos();
QGraphicsView::mouseMoveEvent(event);
}

@ -836,6 +836,7 @@ void UBDraggableThumbnail::paint(QPainter *painter, const QStyleOptionGraphicsIt
draw(painter, *getIcon("duplicate"));
/*
if(movableUp())
draw(painter, *getIcon("moveUp"));
else
@ -845,6 +846,7 @@ void UBDraggableThumbnail::paint(QPainter *painter, const QStyleOptionGraphicsIt
draw(painter, *getIcon("moveDown"));
else
draw(painter, *getIcon("moveDownDisabled"));
*/
}
}
@ -888,11 +890,6 @@ void UBDraggableThumbnail::moveDownPage()
}
void UBDraggableThumbnail::mousePressEvent(QGraphicsSceneMouseEvent *event)
{
event->accept();
}
void UBDraggableThumbnail::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
{
QPointF p = event->pos();
@ -913,6 +910,11 @@ void UBDraggableThumbnail::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
event->accept();
}
void UBDraggableThumbnail::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
{
event->accept();
}
void UBDraggableThumbnailView::updatePos(qreal width, qreal height)
{

Loading…
Cancel
Save