Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix mesh editing map tool issue (#44724)
  • Loading branch information
vcloarec committed Aug 17, 2021
1 parent 21f0a95 commit a4b1d0b
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/app/mesh/qgsmaptooleditmeshframe.cpp
Expand Up @@ -299,7 +299,7 @@ void QgsMapToolEditMeshFrame::deactivate()
{
clearSelection();
clearCanvasHelpers();
deleteZvalueWidget();
mZValueWidget->hide();
qDeleteAll( mFreeVertexMarker );
mFreeVertexMarker.clear();

Expand Down Expand Up @@ -347,6 +347,8 @@ void QgsMapToolEditMeshFrame::clearAll()
void QgsMapToolEditMeshFrame::activate()
{
QgsMapToolAdvancedDigitizing::activate();
if ( mZValueWidget )
mZValueWidget->show();
}

bool QgsMapToolEditMeshFrame::populateContextMenuWithEvent( QMenu *menu, QgsMapMouseEvent *event )
Expand Down Expand Up @@ -1396,13 +1398,14 @@ void QgsMapToolEditMeshFrame::prepareSelection()
QString error;
QgsGeometry allFaces( geomEngine->combine( otherFaces, &error ) );
mSelectedFacesRubberband->setToGeometry( allFaces );
QColor fillColor = canvas()->mapSettings().selectionColor();
}

if ( fillColor.alpha() > 100 ) //set alpha to 150 if the transparency is no enough to see the mesh
fillColor.setAlpha( 100 );
QColor fillColor = canvas()->mapSettings().selectionColor();

mSelectedFacesRubberband->setFillColor( fillColor );
}
if ( fillColor.alpha() > 100 ) //set alpha to 150 if the transparency is not enough to see the mesh
fillColor.setAlpha( 100 );

mSelectedFacesRubberband->setFillColor( fillColor );
}
else
mSelectedFacesRubberband->reset( QgsWkbTypes::PolygonGeometry );
Expand Down

0 comments on commit a4b1d0b

Please sign in to comment.