Gui: decimal point converter: numpad separator always send Period to Python Console & Macro Editor

This commit is contained in:
0penBrain
2022-11-02 14:22:20 +01:00
committed by wwmayer
parent f22646c8fd
commit 30a69066d0

View File

@@ -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;