Fix CBasicViewport using deprecated Qt API

This commit is contained in:
Henrique Gemignani Passos Lima 2021-06-20 23:00:08 +03:00
parent f20d1c17f6
commit d80abeb302
1 changed files with 4 additions and 4 deletions

View File

@ -71,7 +71,7 @@ void CBasicViewport::mousePressEvent(QMouseEvent *pEvent)
{
setFocus();
if (pEvent->button() == Qt::MidButton) mButtonsPressed |= EMouseInput::MiddleButton;
if (pEvent->button() == Qt::MiddleButton) mButtonsPressed |= EMouseInput::MiddleButton;
if (pEvent->button() == Qt::RightButton) mButtonsPressed |= EMouseInput::RightButton;
if (IsMouseInputActive())
@ -102,9 +102,9 @@ void CBasicViewport::mousePressEvent(QMouseEvent *pEvent)
void CBasicViewport::mouseReleaseEvent(QMouseEvent *pEvent)
{
bool fromMouseInput = IsMouseInputActive();
if (pEvent->button() == Qt::LeftButton) mButtonsPressed &= ~EMouseInput::LeftButton;
if (pEvent->button() == Qt::MidButton) mButtonsPressed &= ~EMouseInput::MiddleButton;
if (pEvent->button() == Qt::RightButton) mButtonsPressed &= ~EMouseInput::RightButton;
if (pEvent->button() == Qt::LeftButton) mButtonsPressed &= ~EMouseInput::LeftButton;
if (pEvent->button() == Qt::MiddleButton) mButtonsPressed &= ~EMouseInput::MiddleButton;
if (pEvent->button() == Qt::RightButton) mButtonsPressed &= ~EMouseInput::RightButton;
// Make cursor visible if needed
if (!IsMouseInputActive())