Merge pull request #3040 from dbear496/fix-permmatrix-global
Some checks are pending
macOS Build / build (push) Waiting to run
MINGW64 Qt6 Build / build (push) Waiting to run
MINGW64 Qt5 Build / build (push) Waiting to run
UCRT64 Qt5 Build / build (push) Waiting to run
Ubuntu Qt 5 C/C++ CI / build (push) Waiting to run
Ubuntu Qt 6 C/C++ CI / build (push) Waiting to run

fix the permission matrix global switch
This commit is contained in:
csoler 2025-11-09 19:16:23 +01:00 committed by GitHub
commit 20ff1380ae
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -620,8 +620,8 @@ bool RSPermissionMatrixWidget::computeServiceAndPeer(int x,int y,uint32_t& servi
const float icoFracY = fICON_SIZE_Y/fROW_SIZE;
if(
i < 0 || i >= service_ids.size() ||
j < 0 || j >= peer_ids.size() ||
fi < 0.f || i >= service_ids.size() ||
fj < 0.f || j >= peer_ids.size() ||
std::fmod(fi + icoFracX/2 + .5f, 1.f) >= icoFracX ||
std::fmod(fj + icoFracY/2 + .5f, 1.f) >= icoFracY
) return false;
@ -647,8 +647,8 @@ bool RSPermissionMatrixWidget::computeServiceGlobalSwitch(int x,int y,uint32_t&
const float icoFracX = fICON_SIZE_X/fCOL_SIZE;
if(
i < 0 || i >= service_ids.size() ||
y < -S*fROW_SIZE || y > 0 ||
fi < 0.f || i >= service_ids.size() ||
y >= 0.f || y < -S*fROW_SIZE ||
std::fmod(fi + icoFracX/2 + .5f, 1.f) >= icoFracX
) return false;