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/qgis@13018 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Mar 8, 2010
1 parent a1563a3 commit 7fc7c1e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/app/qgsnewvectorlayerdialog.cpp
Original file line number Diff line number Diff line change
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 7fc7c1e

Please sign in to comment.