File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -120,7 +120,7 @@ void QgsNewVectorLayerDialog::on_mAddAttributeButton_clicked()
120
120
{
121
121
QString myName = mNameEdit ->text ();
122
122
QString myWidth = mWidth ->text ();
123
- QString myPrecision = mPrecision ->text ();
123
+ QString myPrecision = mPrecision ->isEnabled () ? mPrecision -> text () : " " ;
124
124
// use userrole to avoid translated type string
125
125
QString myType = mTypeBox ->itemData ( mTypeBox ->currentIndex (), Qt::UserRole ).toString ();
126
126
mAttributeView ->addTopLevelItem ( new QTreeWidgetItem ( QStringList () << myName << myType << myWidth << myPrecision ) );
@@ -133,7 +133,7 @@ void QgsNewVectorLayerDialog::on_mAddAttributeButton_clicked()
133
133
134
134
void QgsNewVectorLayerDialog::on_mRemoveAttributeButton_clicked ()
135
135
{
136
- delete ( mAttributeView ->currentItem () );
136
+ delete mAttributeView ->currentItem ();
137
137
if ( mAttributeView ->topLevelItemCount () == 0 )
138
138
{
139
139
mOkButton ->setEnabled ( false );
You can’t perform that action at this time.
0 commit comments