mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-22 15:05:59 +01:00
prevent double-registering of avars
This commit is contained in:
parent
cfbab453e8
commit
ff76fbe763
2 changed files with 5 additions and 1 deletions
|
@ -54,10 +54,13 @@ CAnimatedVariable::~CAnimatedVariable() {
|
|||
|
||||
void CAnimatedVariable::unregister() {
|
||||
g_pAnimationManager->m_lAnimatedVariables.remove(this);
|
||||
m_bIsRegistered = false;
|
||||
}
|
||||
|
||||
void CAnimatedVariable::registerVar() {
|
||||
g_pAnimationManager->m_lAnimatedVariables.push_back(this);
|
||||
if (!m_bIsRegistered)
|
||||
g_pAnimationManager->m_lAnimatedVariables.push_back(this);
|
||||
m_bIsRegistered = true;
|
||||
}
|
||||
|
||||
int CAnimatedVariable::getDurationLeftMs() {
|
||||
|
|
|
@ -200,6 +200,7 @@ private:
|
|||
SAnimationPropertyConfig* m_pConfig = nullptr;
|
||||
|
||||
bool m_bDummy = true;
|
||||
bool m_bIsRegistered = false;
|
||||
|
||||
std::chrono::system_clock::time_point animationBegin;
|
||||
|
||||
|
|
Loading…
Reference in a new issue