diff --git a/src/Gui/InputField.cpp b/src/Gui/InputField.cpp index 504753fbf..3793f3c8e 100644 --- a/src/Gui/InputField.cpp +++ b/src/Gui/InputField.cpp @@ -497,6 +497,11 @@ void InputField::focusInEvent(QFocusEvent * event) void InputField::keyPressEvent(QKeyEvent *event) { + if (isReadOnly()) { + QLineEdit::keyPressEvent(event); + return; + } + switch (event->key()) { case Qt::Key_Up: { @@ -520,6 +525,11 @@ void InputField::keyPressEvent(QKeyEvent *event) void InputField::wheelEvent (QWheelEvent * event) { + if (isReadOnly()) { + QLineEdit::wheelEvent(event); + return; + } + double step = event->delta() > 0 ? StepSize : -StepSize; double val = actUnitValue + step; if (val > Maximum) diff --git a/src/Mod/MeshPart/Gui/Tessellation.cpp b/src/Mod/MeshPart/Gui/Tessellation.cpp index 97a452b8b..e8061644f 100644 --- a/src/Mod/MeshPart/Gui/Tessellation.cpp +++ b/src/Mod/MeshPart/Gui/Tessellation.cpp @@ -318,7 +318,7 @@ bool Tessellation::accept() .arg(label); } } - Gui::Command::doCommand(Gui::Command::Doc, (const char*)cmd.toAscii()); + Gui::Command::doCommand(Gui::Command::Doc, (const char*)cmd.toUtf8()); } activeDoc->commitTransaction(); }