fix TextureBrowser::clampOriginY(), min origin could be >0

fixes #186
This commit is contained in:
Garux 2024-04-09 18:57:55 +05:00
parent a0c56feef8
commit d4e1be39ad

View File

@ -272,7 +272,8 @@ public:
}
private:
void clampOriginY(){
m_originy = std::clamp( m_originy, m_height - totalHeight(), 0 );
const int minOrigin = std::min( m_height - totalHeight(), 0 );
m_originy = std::clamp( m_originy, minOrigin, 0 );
}
void evaluateHeight();
int totalHeight(){