diff options
| author | vaxerski <vaxry@vaxry.net> | 2022-08-11 20:17:23 +0200 |
|---|---|---|
| committer | vaxerski <vaxry@vaxry.net> | 2022-08-11 20:17:23 +0200 |
| commit | 008cc63dc03a31797142772885129fd32c964776 (patch) | |
| tree | 35a7d9115ccf68699ccc729358c8d1d6c852c488 /src/managers/AnimationManager.cpp | |
| parent | aba63a7f968e416d63de36c6ab4d8edbce84dc38 (diff) | |
fix error for popin
Diffstat (limited to 'src/managers/AnimationManager.cpp')
| -rw-r--r-- | src/managers/AnimationManager.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/managers/AnimationManager.cpp b/src/managers/AnimationManager.cpp index 2365fb43..14f2fdc9 100644 --- a/src/managers/AnimationManager.cpp +++ b/src/managers/AnimationManager.cpp @@ -372,7 +372,7 @@ void CAnimationManager::onWindowPostCreateClose(CWindow* pWindow, bool close) { // anim popin, fallback float minPerc = 0.f; - if (pWindow->m_sAdditionalConfigData.animationStyle.find("%") != 0) { + if (pWindow->m_sAdditionalConfigData.animationStyle.find("%") != std::string::npos) { try { auto percstr = pWindow->m_sAdditionalConfigData.animationStyle.substr(pWindow->m_sAdditionalConfigData.animationStyle.find_last_of(' ')); minPerc = std::stoi(percstr.substr(0, percstr.length() - 1)); @@ -411,7 +411,7 @@ std::string CAnimationManager::styleValidInConfigVar(const std::string& config, } else if (style.find("popin") == 0) { // try parsing float minPerc = 0.f; - if (style.find("%") != 0) { + if (style.find("%") != std::string::npos) { try { auto percstr = style.substr(style.find_last_of(' ')); minPerc = std::stoi(percstr.substr(0, percstr.length() - 1)); |
