Bug report #9334
Value widget: set default step at 1
Status: | Closed | ||
---|---|---|---|
Priority: | Normal | ||
Assignee: | Matthias Kuhn | ||
Category: | Vectors | ||
Affected QGIS version: | master | Regression?: | No |
Operating System: | Easy fix?: | No | |
Pull Request or Patch supplied: | No | Resolution: | |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 17939 |
Description
the current default for step in the range widget is 0, which seems inappropriate. Please set it at 1
Associated revisions
History
#1 Updated by Paolo Cavallini almost 11 years ago
- Tag set to easy
#2 Updated by Matthias Kuhn almost 11 years ago
- Affected QGIS version changed from 2.0.1 to master
- Target version set to Future Release - Lower Priority
#3 Updated by jtornero - over 10 years ago
One question: which 'value widget' does the issue refer to? I've tried to find it and no success...
Best regards
#4 Updated by Paolo Cavallini over 10 years ago
See above: the "Range" widget in Vactor>Properties>Fields
#5 Updated by jtornero - over 10 years ago
Paolo Cavallini wrote:
See above: the "Range" widget in Vactor>Properties>Fields
Sorry, Giovanni... but at least in my QGIS
2.1.0-Master QGIS code revision fcf48ff
I'm not able to find it. Nothing under menu 'vector' and nothing in the properties>fields tab of a vector layer.
Maybe it's aversion matter?
#6 Updated by jtornero - over 10 years ago
Hi, Paolo et Al.
Well I finally found it (select a layer>properties>fields> and change the attribute editor) and this works under:
QGIS version 2.3.0-Master QGIS code revision 68cf29f
Sorry I tried to upload the patch file but seems that that didn't work. Here is the patch instead:
--- ../dev/cpp/QGIS/src/app/qgsattributetypedialog.cpp 2014-03-26 12:27:44.617836279 0100
++ ../qgsattributetypedialog.cpp 2014-03-26 13:15:46.458020105 0100@ -648,15 +648,7
@
//load data
minimumSpinBox->setValue( mRangeData.mMin.toInt() );
maximumSpinBox->setValue( mRangeData.mMax.toInt() );
-
- if (mRangeData.mStep.toInt() 0)
- {
- stepSpinBox->setValue( 1 );
- }
- else
- {
- stepSpinBox->setValue( mRangeData.mStep.toInt() );
- }
stepSpinBox->setValue( mRangeData.mStep.toInt() );
}
else
{@ -664,14 +656,7
@
//load data
minimumDoubleSpinBox->setValue( mRangeData.mMin.toDouble() );
maximumDoubleSpinBox->setValue( mRangeData.mMax.toDouble() );
- if (mRangeData.mStep.toDouble() 0.0 )
- {
- stepDoubleSpinBox->setValue( 1.0 );
- }
- else
- {
- stepDoubleSpinBox->setValue( mRangeData.mStep.toInt() );
- }
+ stepDoubleSpinBox->setValue( mRangeData.mStep.toDouble() );
}
stackedWidget->setCurrentIndex( 2 );
break;
Maybe it would be nice to tell the user that if no upper range limit is selected and both bottom and top limits are 0, it looks like the feature becomes uneditable through the form.
Best regards,
Jorge Tornero
#7 Updated by Marco Hugentobler over 10 years ago
- Status changed from Open to Closed
Fixed in changeset 019f12172030f081a6ab29a201e4d77ccf34f856.