Bug report #9334

Value widget: set default step at 1

Added by Paolo Cavallini about 10 years ago. Updated about 10 years ago.

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

Revision 019f1217
Added by Marco Hugentobler about 10 years ago

Merge pull request #1264 from olivierdalang/fix_9334

fix #9334

History

#1 Updated by Paolo Cavallini about 10 years ago

  • Tag set to easy

#2 Updated by Matthias Kuhn about 10 years ago

  • Affected QGIS version changed from 2.0.1 to master
  • Target version set to Future Release - Lower Priority

#3 Updated by jtornero - about 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 about 10 years ago

See above: the "Range" widget in Vactor>Properties>Fields

#5 Updated by jtornero - about 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 - about 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 about 10 years ago

  • Status changed from Open to Closed

Also available in: Atom PDF