Skip to content

Commit e41bb34

Browse files
author
jef
committedMar 8, 2010
fix #2523
git-svn-id: http://svn.osgeo.org/qgis/trunk@13018 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent a39de09 commit e41bb34

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎src/app/qgsnewvectorlayerdialog.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ void QgsNewVectorLayerDialog::on_mAddAttributeButton_clicked()
120120
{
121121
QString myName = mNameEdit->text();
122122
QString myWidth = mWidth->text();
123-
QString myPrecision = mPrecision->text();
123+
QString myPrecision = mPrecision->isEnabled() ? mPrecision->text() : "";
124124
//use userrole to avoid translated type string
125125
QString myType = mTypeBox->itemData( mTypeBox->currentIndex(), Qt::UserRole ).toString();
126126
mAttributeView->addTopLevelItem( new QTreeWidgetItem( QStringList() << myName << myType << myWidth << myPrecision ) );
@@ -133,7 +133,7 @@ void QgsNewVectorLayerDialog::on_mAddAttributeButton_clicked()
133133

134134
void QgsNewVectorLayerDialog::on_mRemoveAttributeButton_clicked()
135135
{
136-
delete( mAttributeView->currentItem() );
136+
delete mAttributeView->currentItem();
137137
if ( mAttributeView->topLevelItemCount() == 0 )
138138
{
139139
mOkButton->setEnabled( false );

0 commit comments

Comments
 (0)
Please sign in to comment.