mirror of
https://github.com/PrismLauncher/PrismLauncher
synced 2026-04-23 09:05:03 +00:00
fix(CheckComboBox): check that mouse press is inside view rectangle
Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
(cherry picked from commit 39e283169e)
This commit is contained in:
parent
96ad89845c
commit
fd1d7f3c28
|
|
@ -138,7 +138,7 @@ bool CheckComboBox::eventFilter(QObject* receiver, QEvent* event)
|
|||
}
|
||||
case QEvent::MouseButtonPress: {
|
||||
auto ev = static_cast<QMouseEvent*>(event);
|
||||
m_containerMousePress = ev && view()->indexAt(ev->pos()).isValid();
|
||||
m_containerMousePress = ev && view()->indexAt(ev->pos()).isValid() && view()->rect().contains(ev->pos());
|
||||
break;
|
||||
}
|
||||
case QEvent::Wheel:
|
||||
|
|
@ -203,4 +203,4 @@ void CheckComboBox::paintEvent(QPaintEvent*)
|
|||
painter.drawControl(QStyle::CE_ComboBoxLabel, opt);
|
||||
}
|
||||
|
||||
#include "CheckComboBox.moc"
|
||||
#include "CheckComboBox.moc"
|
||||
|
|
|
|||
Loading…
Reference in a new issue