QuantitySpinBox: Fixed placement of expression editor pop-up.

This commit is contained in:
Eivind Kvedalen
2015-09-22 22:46:58 +02:00
parent 90ccc1cee4
commit 28fe9b481d
3 changed files with 19 additions and 4 deletions

View File

@@ -497,7 +497,7 @@ void QuantitySpinBox::openFormulaDialog()
Gui::Dialog::DlgExpressionInput box(getPath(), getExpression(), d->unit, this);
QPoint pos = mapToGlobal(QPoint(width() / 2, height() / 2));
box.setGeometry(pos.x() - box.tip().x(), pos.y() - box.tip().y(), width(), height());
box.setGeometry(pos.x() - box.tip().x(), pos.y() - box.tip().y(), box.width(), box.height());
if (box.exec() == QDialog::Accepted)
setExpression(box.getExpression());
else if (box.discardedFormula())