Skip to content
Permalink
Browse files

fixed ticket 290, reset selected line when a cat is deleted/added

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@6248 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
rblazek
rblazek committed Dec 12, 2006
1 parent c975b32 commit 897570198b64dfe55e29657a6ae8c8e24a29e43f
Showing with 9 additions and 0 deletions.
  1. +2 −0 src/plugins/grass/qgsgrassedit.cpp
  2. +7 −0 src/plugins/grass/qgsgrassedittools.cpp
@@ -1436,6 +1436,7 @@ void QgsGrassEdit::addCat ( int line )
}

line = mProvider->rewriteLine ( line, type, mPoints, mCats );
mSelectedLine = line;
if ( mAttributes ) mAttributes->setLine ( line );
updateSymb();
increaseMaxCat();
@@ -1471,6 +1472,7 @@ void QgsGrassEdit::deleteCat ( int line, int field, int cat )
Vect_field_cat_del ( mCats, field, cat );

line = mProvider->rewriteLine ( line, type, mPoints, mCats );
mSelectedLine = line;
if ( mAttributes ) mAttributes->setLine ( line );

// Check orphan record
@@ -94,6 +94,7 @@ void QgsGrassEditNewPoint::mouseClick(QgsPoint & point, Qt::ButtonState button)

if ( e->mAttributes )
{
e->mAttributes->setLine ( line );
e->mAttributes->clear();
}
else
@@ -193,6 +194,7 @@ void QgsGrassEditNewLine::mouseClick(QgsPoint & point, Qt::ButtonState button)

if ( e->mAttributes )
{
e->mAttributes->setLine ( line );
e->mAttributes->clear();
}
else
@@ -799,6 +801,7 @@ void QgsGrassEditAttributes::mouseClick(QgsPoint & point, Qt::ButtonState button

if ( e->mAttributes )
{
e->mAttributes->setLine ( 0 );
e->mAttributes->clear();
e->mAttributes->raise();
}
@@ -812,6 +815,10 @@ void QgsGrassEditAttributes::mouseClick(QgsPoint & point, Qt::ButtonState button
{
e->mAttributes = new QgsGrassAttributes ( e, e->mProvider, e->mSelectedLine, e->mQgisApp );
}
else
{
e->mAttributes->setLine ( e->mSelectedLine );
}
for ( int i = 0; i < e->mCats->n_cats; i++ ) {
e->addAttributes ( e->mCats->field[i], e->mCats->cat[i] );
}

0 comments on commit 8975701

Please sign in to comment.
You can’t perform that action at this time.