Skip to content
Permalink
Browse files
Trigger layer repaint when adding field-less features (fixes #17426)
  • Loading branch information
nirvn committed Nov 10, 2017
1 parent 4bdfaa5 commit e7a1c0440abaf144636e8e607f0ed347cf92d308
Showing 1 changed file with 5 additions and 0 deletions.
@@ -217,9 +217,14 @@ bool QgsFeatureAction::addFeature( const QgsAttributeMap &defaultAttributes, boo
mFeatureSaved = mLayer->addFeature( *mFeature );

if ( mFeatureSaved )
{
mLayer->endEditCommand();
mLayer->triggerRepaint();
}
else
{
mLayer->destroyEditCommand();
}
}
else
{

3 comments on commit e7a1c04

@m-kuhn
Copy link
Member

@m-kuhn m-kuhn commented on e7a1c04 Nov 10, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't there a connect missing instead somewhere? This should prevent proactively calling (and forgetting) this 1000 times.

@nirvn
Copy link
Contributor Author

@nirvn nirvn commented on e7a1c04 Nov 10, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@m-kuhn , I was trying to look for that but didn't find any obvious connect we could trigger here.

@m-kuhn
Copy link
Member

@m-kuhn m-kuhn commented on e7a1c04 Nov 10, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or call it in endEditCommand?

Please sign in to comment.