@@ -151,6 +151,16 void ColorScaleEditor::onThresholdChanged(bool checked) | |||
|
151 | 151 | |
|
152 | 152 | ui->minSpinBox->setEnabled(!isAutomatic); |
|
153 | 153 | ui->maxSpinBox->setEnabled(!isAutomatic); |
|
154 | ||
|
155 | // Computes automatic thresholds | |
|
156 | if (isAutomatic) { | |
|
157 | double minThreshold, maxThreshold; | |
|
158 | std::tie(minThreshold, maxThreshold) = SqpColorScale::computeThresholds(m_Scale); | |
|
159 | ui->minSpinBox->setValue(minThreshold); | |
|
160 | ui->maxSpinBox->setValue(maxThreshold); | |
|
161 | ||
|
162 | updatePreview(); | |
|
163 | } | |
|
154 | 164 | } |
|
155 | 165 | } |
|
156 | 166 |
@@ -34,9 +34,6 | |||
|
34 | 34 | <property name="text"> |
|
35 | 35 | <string>OK</string> |
|
36 | 36 | </property> |
|
37 | <property name="default"> | |
|
38 | <bool>true</bool> | |
|
39 | </property> | |
|
40 | 37 | </widget> |
|
41 | 38 | </item> |
|
42 | 39 | <item> |
@@ -71,9 +68,6 | |||
|
71 | 68 | </item> |
|
72 | 69 | <item row="1" column="1"> |
|
73 | 70 | <widget class="QRadioButton" name="thresholdAutoButton"> |
|
74 | <property name="enabled"> | |
|
75 | <bool>false</bool> | |
|
76 | </property> | |
|
77 | 71 | <property name="text"> |
|
78 | 72 | <string>Automatic</string> |
|
79 | 73 | </property> |
@@ -158,10 +152,10 | |||
|
158 | 152 | <tabstops> |
|
159 | 153 | <tabstop>gradientComboBox</tabstop> |
|
160 | 154 | <tabstop>thresholdAutoButton</tabstop> |
|
161 | <tabstop>okButton</tabstop> | |
|
162 | 155 | <tabstop>thresholdManualButton</tabstop> |
|
163 | <tabstop>maxSpinBox</tabstop> | |
|
164 | 156 | <tabstop>minSpinBox</tabstop> |
|
157 | <tabstop>maxSpinBox</tabstop> | |
|
158 | <tabstop>okButton</tabstop> | |
|
165 | 159 | <tabstop>cancelButton</tabstop> |
|
166 | 160 | </tabstops> |
|
167 | 161 | <resources/> |
General Comments 0
You need to be logged in to leave comments.
Login now