Skip to content

Commit

Permalink
Trigger layer repaint when adding field-less features (fixes #17426)
Browse files Browse the repository at this point in the history
  • Loading branch information
nirvn committed Nov 10, 2017
1 parent 4bdfaa5 commit e7a1c04
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/app/qgsfeatureaction.cpp
Expand Up @@ -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
{
Expand Down

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.