Commit 61d84487 authored by Mathieu Westphal's avatar Mathieu Westphal

Using isPrint() instead of isLetterOrNumber()

Using isPrint() instead of isLetterOrNumber() to check if a key is displayed in the widget.
It was causing a bug in paraview where some modification when not recorded properly.
parent 0fa33fb5
......@@ -80,7 +80,7 @@ bool pqDoubleSpinBoxEventTranslator::translateEvent(QObject* Object, QEvent* Eve
{
QKeyEvent* ke = static_cast<QKeyEvent*>(Event);
QString keyText = ke->text();
if(keyText.length() && keyText.at(0).isLetterOrNumber())
if(keyText.length() && keyText.at(0).isPrint())
{
emit recordEvent(object, "set_double", QString("%1").arg(object->value()));
}
......
......@@ -82,7 +82,7 @@ bool pqLineEditEventTranslator::translateEvent(QObject* object, QEvent* event, i
{
QKeyEvent* ke = static_cast<QKeyEvent*>(event);
QString keyText = ke->text();
if(keyText.length() && keyText.at(0).isLetterOrNumber())
if(keyText.length() && keyText.at(0).isPrint())
{
if (leObject)
{
......
......@@ -90,7 +90,7 @@ bool pqSpinBoxEventTranslator::translateEvent(QObject* Object,
QKeyEvent* ke = static_cast<QKeyEvent*>(Event);
QString keyText = ke->text();
this->Value = object->value();
if(keyText.length() && keyText.at(0).isLetterOrNumber())
if(keyText.length() && keyText.at(0).isPrint())
{
emit recordEvent(object, "set_int", QString("%1").arg(object->value()));
}
......
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