Skip to content

Commit 8975701

Browse files

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed
 

‎src/plugins/grass/qgsgrassedit.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1436,6 +1436,7 @@ void QgsGrassEdit::addCat ( int line )
14361436
}
14371437

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

14731474
line = mProvider->rewriteLine ( line, type, mPoints, mCats );
1475+
mSelectedLine = line;
14741476
if ( mAttributes ) mAttributes->setLine ( line );
14751477

14761478
// Check orphan record

‎src/plugins/grass/qgsgrassedittools.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ void QgsGrassEditNewPoint::mouseClick(QgsPoint & point, Qt::ButtonState button)
9494

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

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

800802
if ( e->mAttributes )
801803
{
804+
e->mAttributes->setLine ( 0 );
802805
e->mAttributes->clear();
803806
e->mAttributes->raise();
804807
}
@@ -812,6 +815,10 @@ void QgsGrassEditAttributes::mouseClick(QgsPoint & point, Qt::ButtonState button
812815
{
813816
e->mAttributes = new QgsGrassAttributes ( e, e->mProvider, e->mSelectedLine, e->mQgisApp );
814817
}
818+
else
819+
{
820+
e->mAttributes->setLine ( e->mSelectedLine );
821+
}
815822
for ( int i = 0; i < e->mCats->n_cats; i++ ) {
816823
e->addAttributes ( e->mCats->field[i], e->mCats->cat[i] );
817824
}

0 commit comments

Comments
 (0)
Please sign in to comment.