Gui: decimal point converter: numpad separator always send Period to Python Console & Macro Editor
This commit is contained in:
@@ -33,6 +33,7 @@
|
||||
#endif
|
||||
|
||||
#include <App/Application.h>
|
||||
#include <Gui/TextEdit.h>
|
||||
#include "Translator.h"
|
||||
|
||||
|
||||
@@ -377,6 +378,11 @@ bool Translator::eventFilter(QObject* obj, QEvent* ev)
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if (dynamic_cast<Gui::TextEdit*>(obj) && key != Qt::Key_Period) {
|
||||
QKeyEvent modifiedKeyEvent(kev->type(), Qt::Key_Period, mod, QChar::fromLatin1('.'), kev->isAutoRepeat(), kev->count());
|
||||
qApp->sendEvent(obj, &modifiedKeyEvent);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user