From 75ac6fe0cb012fecc91c12bbdda0b67c8dfafe4d Mon Sep 17 00:00:00 2001 From: Leonardo Zide Date: Sat, 3 Jan 2026 10:14:45 -0300 Subject: [PATCH] Removed unused SetSelected override. --- common/camera.h | 27 --------------------------- common/lc_model.cpp | 6 +----- common/light.h | 10 ---------- common/object.h | 1 - common/piece.h | 10 ---------- 5 files changed, 1 insertion(+), 53 deletions(-) diff --git a/common/camera.h b/common/camera.h index faada241..f9d82f70 100644 --- a/common/camera.h +++ b/common/camera.h @@ -126,33 +126,6 @@ public: mState &= ~(LC_CAMERA_SELECTION_MASK | LC_CAMERA_FOCUS_MASK); } - void SetSelected(quint32 Section, bool Selected) override - { - switch (Section) - { - case LC_CAMERA_SECTION_POSITION: - if (Selected) - mState |= LC_CAMERA_POSITION_SELECTED; - else - mState &= ~(LC_CAMERA_POSITION_SELECTED | LC_CAMERA_POSITION_FOCUSED); - break; - - case LC_CAMERA_SECTION_TARGET: - if (Selected) - mState |= LC_CAMERA_TARGET_SELECTED; - else - mState &= ~(LC_CAMERA_TARGET_SELECTED | LC_CAMERA_TARGET_FOCUSED); - break; - - case LC_CAMERA_SECTION_UPVECTOR: - if (Selected) - mState |= LC_CAMERA_UPVECTOR_SELECTED; - else - mState &= ~(LC_CAMERA_UPVECTOR_SELECTED | LC_CAMERA_UPVECTOR_FOCUSED); - break; - } - } - bool IsFocused() const override { return (mState & LC_CAMERA_FOCUS_MASK) != 0; diff --git a/common/lc_model.cpp b/common/lc_model.cpp index bfeb8851..9119050f 100644 --- a/common/lc_model.cpp +++ b/common/lc_model.cpp @@ -4569,11 +4569,7 @@ void lcModel::RemoveFromSelection(const lcObjectSection& ObjectSection) const bool WasSelected = SelectedObject->IsSelected(); - if (SelectedObject->IsFocused(ObjectSection.Section)) - SelectedObject->SetSelected(ObjectSection.Section, false); - else - SelectedObject->SetSelected(false); - + SelectedObject->SetSelected(false); if (SelectedObject->IsPiece() && WasSelected) { diff --git a/common/light.h b/common/light.h index 91497b11..4ad7f45f 100644 --- a/common/light.h +++ b/common/light.h @@ -96,16 +96,6 @@ public: mFocusedSection = LC_LIGHT_SECTION_INVALID; } - void SetSelected(quint32 Section, bool Selected) override - { - Q_UNUSED(Section); - - mSelected = Selected; - - if (!Selected) - mFocusedSection = LC_LIGHT_SECTION_INVALID; - } - bool IsFocused() const override { return mFocusedSection != LC_LIGHT_SECTION_INVALID; diff --git a/common/object.h b/common/object.h index 71aa2c4a..27e189d3 100644 --- a/common/object.h +++ b/common/object.h @@ -90,7 +90,6 @@ public: virtual bool IsSelected() const = 0; virtual bool IsSelected(quint32 Section) const = 0; virtual void SetSelected(bool Selected) = 0; - virtual void SetSelected(quint32 Section, bool Selected) = 0; virtual bool IsFocused() const = 0; virtual bool IsFocused(quint32 Section) const = 0; virtual void SetFocused(quint32 Section, bool Focused) = 0; diff --git a/common/piece.h b/common/piece.h index 7523a06f..476c1fb0 100644 --- a/common/piece.h +++ b/common/piece.h @@ -56,16 +56,6 @@ public: mFocusedSection = LC_PIECE_SECTION_INVALID; } - void SetSelected(quint32 Section, bool Selected) override - { - Q_UNUSED(Section); - - mSelected = Selected; - - if (!Selected) - mFocusedSection = LC_PIECE_SECTION_INVALID; - } - bool IsFocused() const override { return mFocusedSection != LC_PIECE_SECTION_INVALID;