-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mesh selection actions #58888
Mesh selection actions #58888
Conversation
QList<int> verticesIndexes; | ||
verticesIndexes.reserve( mCurrentLayer->meshVertexCount() ); | ||
for ( int i = 0; i < mCurrentLayer->meshVertexCount(); i++ ) | ||
{ | ||
verticesIndexes.append( i ); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
meshVertexCount()
says:
\note during mesh editing, some vertices can be void and are not included in this returned value
does that affect us?
Would it be better to maybe use mCurrentLayer->selectVerticesByExpression( true )
to get the indexes instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like a good point.
We could avoid evaluating the expression by using mCurrentLayer->nativeMesh()->vertexCount()
. That would skip need to use QgsExpression
and its evaluation. It is what the mCurrentLayer->selectVerticesByExpression()
does internally anyways.
🪟 Windows buildsDownload Windows builds of this PR for testing. |
@JanCaha A documentation ticket will be opened at https://github.com/qgis/QGIS-Documentation when this PR is merged. Please update the description (not the comments) with helpful description and screenshot to help the work from documentors. Thank you! |
This pull request has been tagged for the changelog.
You can edit the description. Format available for credits
Thank you! |
@JanCaha |
Description
Adds two new actions for selecting vertices on Mesh: