[Sketch] fix SnellsLaw dialog
- add missing class to UI file (found and automatically added by Qt Designer) - add more sensible stepsize - you are dealing in practice with rations in the range 1.2 - 1.6 thus a stepsize of 1.0 is not helpful
This commit is contained in:
@@ -6976,6 +6976,7 @@ void CmdSketcherConstrainSnellsLaw::activated(int iMsg)
|
||||
ui_Datum.labelEdit->setParamGrpPath(QByteArray("User parameter:BaseApp/History/SketcherRefrIndexRatio"));
|
||||
ui_Datum.labelEdit->setToLastUsedValue();
|
||||
ui_Datum.labelEdit->selectNumber();
|
||||
ui_Datum.labelEdit->setSingleStep(0.05);
|
||||
// Unable to bind, because the constraint does not yet exist
|
||||
|
||||
if (dlg.exec() != QDialog::Accepted) return;
|
||||
|
||||
@@ -119,6 +119,7 @@ void EditDatumDialog::exec(bool atCursor)
|
||||
dlg.setWindowTitle(tr("Refractive index ratio", "Constraint_SnellsLaw"));
|
||||
ui_ins_datum->label->setText(tr("Ratio n2/n1:", "Constraint_SnellsLaw"));
|
||||
ui_ins_datum->labelEdit->setParamGrpPath(QByteArray("User parameter:BaseApp/History/SketcherRefrIndexRatio"));
|
||||
ui_ins_datum->labelEdit->setSingleStep(0.05);
|
||||
}
|
||||
else {
|
||||
dlg.setWindowTitle(tr("Insert length"));
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="Gui::PrefQuantitySpinBox" name="labelEdit" native="true">
|
||||
<widget class="Gui::PrefQuantitySpinBox" name="labelEdit">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
@@ -94,8 +94,13 @@
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>Gui::PrefQuantitySpinBox</class>
|
||||
<class>Gui::QuantitySpinBox</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>Gui/QuantitySpinBox.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>Gui::PrefQuantitySpinBox</class>
|
||||
<extends>Gui::QuantitySpinBox</extends>
|
||||
<header>Gui/PrefWidgets.h</header>
|
||||
<slots>
|
||||
<signal>showFormulaDialog(bool)</signal>
|
||||
|
||||
Reference in New Issue
Block a user