From 88e6ea0a7f104d469ddd99f1476ee32048cca263 Mon Sep 17 00:00:00 2001 From: kaixoo <21697330-kaixoo@users.noreply.gitlab.com> Date: Fri, 17 Jan 2025 13:38:49 +0200 Subject: [PATCH] docs: cleanup --- src/core/canvas.h | 5 +---- src/core/canvashandlesmartpath.cpp | 2 +- src/core/canvasmouseinteractions.cpp | 4 ++-- src/core/canvasselectedboxesactions.cpp | 7 +------ 4 files changed, 5 insertions(+), 13 deletions(-) diff --git a/src/core/canvas.h b/src/core/canvas.h index 4724686b5..e08b7e61e 100644 --- a/src/core/canvas.h +++ b/src/core/canvas.h @@ -24,7 +24,6 @@ #include "Boxes/containerbox.h" #include "colorhelpers.h" -#include #include "CacheHandlers/hddcachablecachehandler.h" #include "skia/skiaincludes.h" #include "GUI/valueinput.h" @@ -35,15 +34,12 @@ //#include "Paint/drawableautotiledsurface.h" #include "canvasbase.h" //#include "Paint/animatedsurface.h" -#include #include "Animators/outlinesettingsanimator.h" //#include "Paint/painttarget.h" #include "CacheHandlers/usepointer.h" #include "CacheHandlers/sceneframecontainer.h" #include "undoredo.h" #include "drawpath.h" -#include -#include class AnimatedSurface; //class PaintBox; @@ -341,6 +337,7 @@ class CORE_EXPORT Canvas : public CanvasBase QRect getCurrentBounds() const { + // TODO: ? //if(mClipToCanvasSize) return getCanvasBounds(); //else return getMaxBounds(); return getMaxBounds(); diff --git a/src/core/canvashandlesmartpath.cpp b/src/core/canvashandlesmartpath.cpp index edc15603f..3b22a80c5 100644 --- a/src/core/canvashandlesmartpath.cpp +++ b/src/core/canvashandlesmartpath.cpp @@ -97,7 +97,7 @@ void Canvas::handleAddSmartPointMouseMove(const eMouseEvent &e) { mLastEndPoint->moveC0ToAbsPos(e.fPos); } else { if(!mLastEndPoint->hasNextNormalPoint() && - !mLastEndPoint->hasPrevNormalPoint()) { + !mLastEndPoint->hasPrevNormalPoint()) { mLastEndPoint->setCtrlsMode(CtrlsMode::corner); mLastEndPoint->setC2Enabled(true); } else { diff --git a/src/core/canvasmouseinteractions.cpp b/src/core/canvasmouseinteractions.cpp index f03f81a28..54b364c50 100644 --- a/src/core/canvasmouseinteractions.cpp +++ b/src/core/canvasmouseinteractions.cpp @@ -699,8 +699,8 @@ void Canvas::handleMovePointMouseMove(const eMouseEvent &e) { } void Canvas::scaleSelected(const eMouseEvent& e) { - const QPointF absPos = mRotPivot->getAbsolutePos(); - const QPointF distMoved = e.fPos - e.fLastPressPos; + const auto absPos = mRotPivot->getAbsolutePos(); + const auto distMoved = e.fPos - e.fLastPressPos; qreal scaleBy; if(mValueInput.inputEnabled()) { diff --git a/src/core/canvasselectedboxesactions.cpp b/src/core/canvasselectedboxesactions.cpp index ea73e7ce9..e0ebbf8af 100644 --- a/src/core/canvasselectedboxesactions.cpp +++ b/src/core/canvasselectedboxesactions.cpp @@ -372,12 +372,6 @@ void Canvas::rotateSelectedBy(const qreal rotBy, } } -void Canvas::scaleSelectedBy(const qreal scaleBy, - const QPointF &absOrigin, - const bool startTrans) { - scaleSelectedBy(scaleBy, scaleBy, absOrigin, startTrans); -} - void Canvas::scaleSelectedBy(const qreal scaleXBy, const qreal scaleYBy, const QPointF& absOrigin, @@ -686,6 +680,7 @@ void Canvas::moveSelectedBoxesByAbs(const QPointF &by, } } +// FIXME: ? //QPointF BoxesGroup::getRelCenterPosition() { // QPointF posSum = QPointF(0., 0.); // if(mChildren.isEmpty()) return posSum;