git-svn-id: svn://db.shs.com.ru/libs@420 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -258,7 +258,7 @@ bool BlockView::eventFilter(QObject * o, QEvent * e) {
|
||||
mm_drag = moved = false;
|
||||
screen_point = me->screenPos();
|
||||
scene_point = me->scenePos();
|
||||
if (me->button() == Qt::MidButton) {
|
||||
if ((me->button() == Qt::MidButton) || (me->button() == Qt::RightButton)) {
|
||||
thumbShow();
|
||||
restartTimer(timer_thumb, thumb_hide_delay);
|
||||
return true;
|
||||
@@ -493,7 +493,7 @@ bool BlockView::eventFilter(QObject * o, QEvent * e) {
|
||||
if (me->buttons().testFlag(Qt::RightButton)) btncnt++;
|
||||
if (me->buttons().testFlag(Qt::MidButton)) btncnt++;
|
||||
mm_cancel = btncnt > 0;
|
||||
if (mm_cancel || me->button() == Qt::MidButton) {
|
||||
if (mm_cancel || (me->button() == Qt::MidButton) || (me->button() == Qt::RightButton)) {
|
||||
mm_ci = 0;
|
||||
return true;
|
||||
}
|
||||
@@ -650,7 +650,12 @@ void BlockView::wheelEvent(QWheelEvent * e) {
|
||||
|
||||
void BlockView::mousePressEvent(QMouseEvent * event) {
|
||||
press_point = event->pos();
|
||||
if (event->buttons().testFlag(Qt::MidButton)) setCursor(Qt::ClosedHandCursor);
|
||||
if (event->buttons().testFlag(Qt::MidButton) || event->buttons().testFlag(Qt::RightButton)) {
|
||||
setCursor(Qt::ClosedHandCursor);
|
||||
sel_rect.hide();
|
||||
if (sel_rect.scene())
|
||||
scene_->removeItem(&sel_rect);
|
||||
}
|
||||
QGraphicsView::mousePressEvent(event);
|
||||
}
|
||||
|
||||
@@ -663,7 +668,7 @@ void BlockView::mouseReleaseEvent(QMouseEvent * event) {
|
||||
|
||||
void BlockView::mouseMoveEvent(QMouseEvent * event) {
|
||||
if (navigation) {
|
||||
if (event->buttons().testFlag(Qt::MidButton)) {
|
||||
if (event->buttons().testFlag(Qt::MidButton) || event->buttons().testFlag(Qt::RightButton)) {
|
||||
QPoint dp = (press_point - event->pos());
|
||||
horizontalScrollBar()->setValue(horizontalScrollBar()->value() + dp.x());
|
||||
verticalScrollBar()->setValue(verticalScrollBar()->value() + dp.y());
|
||||
|
||||
Reference in New Issue
Block a user