Fix: 导出设置图像大小输入框Bug
parent
dad2c1fa59
commit
fb85447a2f
|
@ -189,10 +189,10 @@ void EditorWidgetItem::exportAs()
|
||||||
supersampleTextField.setText(QString::number(2));
|
supersampleTextField.setText(QString::number(2));
|
||||||
|
|
||||||
connect(&widthTextField, &QLineEdit::textChanged, [&](const QString& string) {
|
connect(&widthTextField, &QLineEdit::textChanged, [&](const QString& string) {
|
||||||
heightTextField.setText(QString::number(previewWindow->referSize.height() * string.toInt() / (double)previewWindow->referSize.width()));
|
heightTextField.setText(QString::number((int)std::round(previewWindow->referSize.height() * string.toInt() / (double)previewWindow->referSize.width())));
|
||||||
});
|
});
|
||||||
connect(&heightTextField, &QLineEdit::textChanged, [&](const QString& string) {
|
connect(&heightTextField, &QLineEdit::textChanged, [&](const QString& string) {
|
||||||
widthTextField.setText(QString::number(previewWindow->referSize.width() * string.toInt() / (double)previewWindow->referSize.height()));
|
widthTextField.setText(QString::number((int)std::round(previewWindow->referSize.width()* string.toInt() / (double)previewWindow->referSize.height())));
|
||||||
});
|
});
|
||||||
|
|
||||||
QDialog* dialog = new QDialog(this);
|
QDialog* dialog = new QDialog(this);
|
||||||
|
|
Loading…
Reference in New Issue