+ fix bug in read-only InputField, minor Utf-8 issue in meshing dialog

This commit is contained in:
wmayer 2015-04-22 14:01:27 +02:00
parent bab894b775
commit 197aa0c85c
2 changed files with 11 additions and 1 deletions

View File

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

View File

@ -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();
}