Updates will be applied on October 27th between 12pm - 12:45pm EDT (UTC-0400). Gitlab may be slow during the maintenance window.

Commit d8c024e9 authored by Clinton Stimpson's avatar Clinton Stimpson
Browse files

BUG: Consume line edit events if part of spin box, so the generic QWidget

      translator doesn't get them.
parent 9314e49d
...@@ -47,6 +47,12 @@ bool pqDoubleSpinBoxEventTranslator::translateEvent(QObject* Object, QEvent* Eve ...@@ -47,6 +47,12 @@ bool pqDoubleSpinBoxEventTranslator::translateEvent(QObject* Object, QEvent* Eve
if(!object) if(!object)
return false; return false;
// consume line edit events if part of spin box
if(!object && qobject_cast<QDoubleSpinBox*>(Object->parent()))
{
return true;
}
switch(Event->type()) switch(Event->type())
{ {
case QEvent::Enter: case QEvent::Enter:
......
...@@ -43,7 +43,14 @@ pqSpinBoxEventTranslator::pqSpinBoxEventTranslator(QObject* p) ...@@ -43,7 +43,14 @@ pqSpinBoxEventTranslator::pqSpinBoxEventTranslator(QObject* p)
bool pqSpinBoxEventTranslator::translateEvent(QObject* Object, QEvent* Event, bool& /*Error*/) bool pqSpinBoxEventTranslator::translateEvent(QObject* Object, QEvent* Event, bool& /*Error*/)
{ {
QSpinBox* const object = qobject_cast<QSpinBox*>(Object); QSpinBox* object = qobject_cast<QSpinBox*>(Object);
// consume line edit events if part of spin box
if(!object && qobject_cast<QSpinBox*>(Object->parent()))
{
return true;
}
if(!object) if(!object)
return false; return false;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment