[go: nahoru, domu]

Skip to content

Commit

Permalink
BUG: Line edit translator was incorrectly generating events while int…
Browse files Browse the repository at this point in the history
…eracting with a spinbox
  • Loading branch information
tshead2 committed Nov 7, 2005
1 parent 04c2139 commit ae98ed2
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions pqLineEditEventTranslator.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@

#include "pqLineEditEventTranslator.h"

#include <QLineEdit>
#include <QEvent>
#include <QLineEdit>
#include <QSpinBox>

pqLineEditEventTranslator::pqLineEditEventTranslator() :
CurrentObject(0)
Expand All @@ -22,7 +23,11 @@ bool pqLineEditEventTranslator::translateEvent(QObject* Object, QEvent* Event)
QLineEdit* const object = qobject_cast<QLineEdit*>(Object);
if(!object)
return false;


// If this line edit is part of a spinbox, don't translate events (the spinbox translator will receive the final value directly)
if(qobject_cast<QSpinBox*>(Object->parent()))
return false;

switch(Event->type())
{
case QEvent::Enter:
Expand Down

0 comments on commit ae98ed2

Please sign in to comment.