Skip to content

Commit

Permalink
fix #2523
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@13018 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Mar 8, 2010
1 parent a39de09 commit e41bb34
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/app/qgsnewvectorlayerdialog.cpp
Expand Up @@ -120,7 +120,7 @@ void QgsNewVectorLayerDialog::on_mAddAttributeButton_clicked()
{
QString myName = mNameEdit->text();
QString myWidth = mWidth->text();
QString myPrecision = mPrecision->text();
QString myPrecision = mPrecision->isEnabled() ? mPrecision->text() : "";
//use userrole to avoid translated type string
QString myType = mTypeBox->itemData( mTypeBox->currentIndex(), Qt::UserRole ).toString();
mAttributeView->addTopLevelItem( new QTreeWidgetItem( QStringList() << myName << myType << myWidth << myPrecision ) );
Expand All @@ -133,7 +133,7 @@ void QgsNewVectorLayerDialog::on_mAddAttributeButton_clicked()

void QgsNewVectorLayerDialog::on_mRemoveAttributeButton_clicked()
{
delete( mAttributeView->currentItem() );
delete mAttributeView->currentItem();
if ( mAttributeView->topLevelItemCount() == 0 )
{
mOkButton->setEnabled( false );
Expand Down

0 comments on commit e41bb34

Please sign in to comment.