Skip to content

Commit

Permalink
fix styling
Browse files Browse the repository at this point in the history
  • Loading branch information
JanCaha committed Sep 27, 2024
1 parent b5076c5 commit 5cd40f7
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions src/app/mesh/qgsmaptooleditmeshframe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,8 @@ QgsMapToolEditMeshFrame::QgsMapToolEditMeshFrame( QgsMapCanvas *canvas )

mSelectionHandler = std::make_unique<QgsMapToolSelectionHandler>( canvas, QgsMapToolSelectionHandler::SelectPolygon );

mActionSelectIsolatedVertices = new QAction(QgsApplication::getThemeIcon( QStringLiteral("/mActionMeshSelectIsolatedVertices.svg")), tr("Select Isolated Vertices"), this);
mActionSelectAllVertices = new QAction( QgsApplication::getThemeIcon( QStringLiteral("/mActionMeshSelectAll.svg")), tr("Select All Vertices"), this);
mActionSelectIsolatedVertices = new QAction( QgsApplication::getThemeIcon( QStringLiteral( "/mActionMeshSelectIsolatedVertices.svg" ) ), tr( "Select Isolated Vertices" ), this );
mActionSelectAllVertices = new QAction( QgsApplication::getThemeIcon( QStringLiteral( "/mActionMeshSelectAll.svg" ) ), tr( "Select All Vertices" ), this );

mSelectActions << mActionSelectByPolygon
<< mActionSelectByExpression
Expand Down Expand Up @@ -277,21 +277,22 @@ QgsMapToolEditMeshFrame::QgsMapToolEditMeshFrame( QgsMapCanvas *canvas )
connect( mActionSelectIsolatedVertices, &QAction::triggered, this, [this]
{
onEditingStarted();
setSelectedVertices(mCurrentEditor->freeVerticesIndexes(), Qgis::SelectBehavior::SetSelection);
});
setSelectedVertices( mCurrentEditor->freeVerticesIndexes(), Qgis::SelectBehavior::SetSelection );
} );

connect( mActionSelectAllVertices, &QAction::triggered, this, [this]
{
onEditingStarted();
onEditingStarted();

QList<int> verticesIndexes;
verticesIndexes.reserve(mCurrentLayer->meshVertexCount());
for (int i = 0; i < mCurrentLayer->meshVertexCount(); i++){
verticesIndexes.append(i);
}
QList<int> verticesIndexes;
verticesIndexes.reserve( mCurrentLayer->meshVertexCount() );
for ( int i = 0; i < mCurrentLayer->meshVertexCount(); i++ )
{
verticesIndexes.append( i );
}

setSelectedVertices(verticesIndexes, Qgis::SelectBehavior::SetSelection);
});
setSelectedVertices( verticesIndexes, Qgis::SelectBehavior::SetSelection );
} );

connect( mActionSelectByExpression, &QAction::triggered, this, &QgsMapToolEditMeshFrame::showSelectByExpressionDialog );
connect( mActionTransformCoordinates, &QAction::triggered, this, &QgsMapToolEditMeshFrame::triggerTransformCoordinatesDockWidget );
Expand Down

0 comments on commit 5cd40f7

Please sign in to comment.