From c6ee04c8cfca5de8df4a5b76411b52e0cca09727 Mon Sep 17 00:00:00 2001 From: Michail Vourlakos Date: Mon, 26 Apr 2021 17:18:39 +0300 Subject: [PATCH] data::view split moving flag in two values --isMoveOrigin/isMoveDestination are flags used to identify view records during Cut operation --- app/data/viewdata.cpp | 15 ++++++++++----- app/data/viewdata.h | 3 ++- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/app/data/viewdata.cpp b/app/data/viewdata.cpp index 57770ec39..9e3ee71ef 100644 --- a/app/data/viewdata.cpp +++ b/app/data/viewdata.cpp @@ -31,7 +31,8 @@ View::View() View::View(View &&o) : Generic(o), isActive(o.isActive), - isScheduledForMove(o.isScheduledForMove), + isMoveOrigin(o.isMoveOrigin), + isMoveDestination(o.isMoveDestination), onPrimary(o.onPrimary), screen(o.screen), screenEdgeMargin(o.screenEdgeMargin), @@ -49,7 +50,8 @@ View::View(View &&o) View::View(const View &o) : Generic(o), isActive(o.isActive), - isScheduledForMove(o.isScheduledForMove), + isMoveOrigin(o.isMoveOrigin), + isMoveDestination(o.isMoveDestination), onPrimary(o.onPrimary), screen(o.screen), screenEdgeMargin(o.screenEdgeMargin), @@ -69,7 +71,8 @@ View &View::operator=(const View &rhs) id = rhs.id; name = rhs.name; isActive = rhs.isActive; - isScheduledForMove = rhs.isScheduledForMove; + isMoveOrigin = rhs.isMoveOrigin; + isMoveDestination = rhs.isMoveDestination; onPrimary = rhs.onPrimary; screen = rhs.screen; screenEdgeMargin = rhs.screenEdgeMargin, @@ -90,7 +93,8 @@ View &View::operator=(View &&rhs) id = rhs.id; name = rhs.name; isActive = rhs.isActive; - isScheduledForMove = rhs.isScheduledForMove; + isMoveOrigin = rhs.isMoveOrigin; + isMoveDestination = rhs.isMoveDestination; onPrimary = rhs.onPrimary; screen = rhs.screen; screenEdgeMargin = rhs.screenEdgeMargin, @@ -111,7 +115,8 @@ bool View::operator==(const View &rhs) const return (id == rhs.id) && (name == rhs.name) //&& (isActive == rhs.isActive) /*activeness is a state and is not considered*/ - //&& (isScheduledForMove == rhs.isScheduledForMove) /*changing layouts is a state and is not considered*/ + //&& (isMoveOrigin == rhs.isMoveOrigin) /*changing layouts is a state and is not considered*/ + //&& (isMoveDestination == rhs.isMoveDestination) /*changing layouts is a state and is not considered*/ && (onPrimary == rhs.onPrimary) && (screen == rhs.screen) && (screenEdgeMargin == rhs.screenEdgeMargin) diff --git a/app/data/viewdata.h b/app/data/viewdata.h index 762b8041b..706d5bf63 100644 --- a/app/data/viewdata.h +++ b/app/data/viewdata.h @@ -62,7 +62,8 @@ public: GenericTable subcontainments; //! View sub-states - bool isScheduledForMove{false}; + bool isMoveOrigin{false}; + bool isMoveDestination{true}; bool isValid() const; bool isCreated() const;