Skip to content

Commit

Permalink
fixed crash on edit attr / no line
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@12925 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
rblazek committed Feb 11, 2010
1 parent 6b28fc2 commit 91ad1ec
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/plugins/grass/qgsgrassedittools.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -893,9 +893,11 @@ void QgsGrassEditAttributes::mouseClick( QgsPoint & point, Qt::MouseButton butto
e->mAttributes->setLine( 0 );
e->mAttributes->clear();
e->mAttributes->raise();
// Just to disable new button
e->mAttributes->setCategoryMode( QgsGrassEdit::CAT_MODE_NOCAT, QString() );
}

if ( e->mSelectedLine ) // highlite
if ( e->mSelectedLine > 0 ) // highlite
{
e->displayElement( e->mSelectedLine, e->mSymb[QgsGrassEdit::SYMB_HIGHLIGHT], e->mSize );

Expand All @@ -915,7 +917,6 @@ void QgsGrassEditAttributes::mouseClick( QgsPoint & point, Qt::MouseButton butto
}
e->mAttributes->show();
e->mAttributes->raise();
e->mAttributes->setCategoryMode( static_cast<QgsGrassEdit::CatMode>( e->mCatModeBox->currentIndex() ), e->mCatEntry->text() );
}

e->mAttributes->setCategoryMode( static_cast<QgsGrassEdit::CatMode>( e->mCatModeBox->currentIndex() ), e->mCatEntry->text() );
}

0 comments on commit 91ad1ec

Please sign in to comment.