File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -90,6 +90,7 @@ void QgsAddAttrDialog::setPrecisionMinMax()
90
90
int minPrecType = mTypeBox ->itemData ( idx, Qt::UserRole + 4 ).toInt ();
91
91
int maxPrecType = mTypeBox ->itemData ( idx, Qt::UserRole + 5 ).toInt ();
92
92
bool precisionIsEnabled = minPrecType < maxPrecType;
93
+ mPrec ->setEnabled ( precisionIsEnabled );
93
94
mPrec ->setVisible ( precisionIsEnabled );
94
95
mPrecLabel ->setVisible ( precisionIsEnabled );
95
96
@@ -138,7 +139,7 @@ QgsField QgsAddAttrDialog::field() const
138
139
( QVariant::Type ) mTypeBox ->currentData ( Qt::UserRole ).toInt (),
139
140
mTypeBox ->currentData ( Qt::UserRole + 1 ).toString (),
140
141
mLength ->value (),
141
- mPrec ->isVisible () ? mPrec ->value () : 0 ,
142
+ mPrec ->isEnabled () ? mPrec ->value () : 0 ,
142
143
mCommentEdit ->text (),
143
144
static_cast <QVariant::Type>( mTypeBox ->currentData ( Qt::UserRole ).toInt () ) == QVariant::Map ? QVariant::String : QVariant::Invalid
144
145
);
You can’t perform that action at this time.
0 commit comments