TechDraw: Fix ignored "Zoom at Cursor" for TouchPad style
This commit is contained in:
committed by
Chris Hennes
parent
04e4c1a15b
commit
9a968216d6
@@ -121,10 +121,18 @@ void QGVNavStyleTouchpad::handleMouseMoveEvent(QMouseEvent *event)
|
||||
|
||||
void QGVNavStyleTouchpad::setAnchor()
|
||||
{
|
||||
//this navigation style can not anchor under mouse since mouse is moving as part of zoom action
|
||||
if (m_viewer) {
|
||||
m_viewer->setResizeAnchor(QGraphicsView::AnchorViewCenter);
|
||||
m_viewer->setTransformationAnchor(QGraphicsView::AnchorViewCenter);
|
||||
if (QGuiApplication::keyboardModifiers().testFlag(Qt::ControlModifier)
|
||||
&& QGuiApplication::keyboardModifiers().testFlag(Qt::ShiftModifier)) {
|
||||
// this navigation style can not anchor under mouse when zooming with Ctrl + Shift since
|
||||
// mouse is moving as part of zoom action
|
||||
|
||||
if (m_viewer) {
|
||||
m_viewer->setResizeAnchor(QGraphicsView::AnchorViewCenter);
|
||||
m_viewer->setTransformationAnchor(QGraphicsView::AnchorViewCenter);
|
||||
}
|
||||
}
|
||||
else {
|
||||
QGVNavStyle::setAnchor();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user