internal: allow opening empty special workspaces
Fixes point 2 of #2596
This commit is contained in:
parent
23e17700a7
commit
870471dd96
5 changed files with 47 additions and 37 deletions
|
|
@ -66,9 +66,7 @@ void CWorkspace::startAnim(bool in, bool left, bool instant) {
|
|||
try {
|
||||
auto percstr = ANIMSTYLE.substr(ANIMSTYLE.find_last_of(' ') + 1);
|
||||
movePerc = std::stoi(percstr.substr(0, percstr.length() - 1));
|
||||
} catch (std::exception& e) {
|
||||
Debug::log(ERR, "Error in startAnim: invalid percentage");
|
||||
}
|
||||
} catch (std::exception& e) { Debug::log(ERR, "Error in startAnim: invalid percentage"); }
|
||||
}
|
||||
|
||||
m_fAlpha.setValueAndWarp(1.f);
|
||||
|
|
@ -133,6 +131,17 @@ void CWorkspace::startAnim(bool in, bool left, bool instant) {
|
|||
}
|
||||
}
|
||||
|
||||
if (m_bIsSpecialWorkspace) {
|
||||
// required for open/close animations
|
||||
if (in) {
|
||||
m_fAlpha.setValueAndWarp(0.f);
|
||||
m_fAlpha = 1.f;
|
||||
} else {
|
||||
m_fAlpha.setValueAndWarp(1.f);
|
||||
m_fAlpha = 0.f;
|
||||
}
|
||||
}
|
||||
|
||||
if (instant) {
|
||||
m_vRenderOffset.warp();
|
||||
m_fAlpha.warp();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue