Skip to content

Commit 91ad1ec

Browse files
author
rblazek
committed
fixed crash on edit attr / no line
git-svn-id: http://svn.osgeo.org/qgis/trunk@12925 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 6b28fc2 commit 91ad1ec

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/plugins/grass/qgsgrassedittools.cpp

+4-3
Original file line numberDiff line numberDiff line change
@@ -893,9 +893,11 @@ void QgsGrassEditAttributes::mouseClick( QgsPoint & point, Qt::MouseButton butto
893893
e->mAttributes->setLine( 0 );
894894
e->mAttributes->clear();
895895
e->mAttributes->raise();
896+
// Just to disable new button
897+
e->mAttributes->setCategoryMode( QgsGrassEdit::CAT_MODE_NOCAT, QString() );
896898
}
897899

898-
if ( e->mSelectedLine ) // highlite
900+
if ( e->mSelectedLine > 0 ) // highlite
899901
{
900902
e->displayElement( e->mSelectedLine, e->mSymb[QgsGrassEdit::SYMB_HIGHLIGHT], e->mSize );
901903

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

0 commit comments

Comments
 (0)