From 20f370422c3439bd3411cfa4c8099f56911cd7ed Mon Sep 17 00:00:00 2001 From: huxingyi Date: Wed, 14 Oct 2020 22:55:30 +0930 Subject: [PATCH] Fix Zoom out [skip ci] Fix #93 --- src/skeletongraphicswidget.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/skeletongraphicswidget.cpp b/src/skeletongraphicswidget.cpp index 0caec937..3183a008 100644 --- a/src/skeletongraphicswidget.cpp +++ b/src/skeletongraphicswidget.cpp @@ -1516,18 +1516,18 @@ bool SkeletonGraphicsWidget::mousePress(QMouseEvent *event) if (SkeletonDocumentEditMode::ZoomIn == m_document->editMode) { ViewportAnchor lastAnchor = transformationAnchor(); setTransformationAnchor(QGraphicsView::AnchorUnderMouse); - scale(1.5, 1.5); + scale(1.25, 1.25); setTransformationAnchor(lastAnchor); return true; } else if (SkeletonDocumentEditMode::ZoomOut == m_document->editMode) { ViewportAnchor lastAnchor = transformationAnchor(); setTransformationAnchor(QGraphicsView::AnchorUnderMouse); - scale(0.5, 0.5); + scale(0.8, 0.8); setTransformationAnchor(lastAnchor); - if ((!verticalScrollBar() || !verticalScrollBar()->isVisible()) && - (!horizontalScrollBar() || !horizontalScrollBar()->isVisible())) { - setTransform(QTransform()); - } + //if ((!verticalScrollBar() || !verticalScrollBar()->isVisible()) && + // (!horizontalScrollBar() || !horizontalScrollBar()->isVisible())) { + // setTransform(QTransform()); + //} return true; } else if (SkeletonDocumentEditMode::Drag == m_document->editMode) { if (!m_dragStarted) {