Skip to content

Commit

Permalink
some refactoring and fixes issue with rubberband and trace
Browse files Browse the repository at this point in the history
  • Loading branch information
vcloarec committed Jul 29, 2020
1 parent f3a8dd7 commit 932151f
Show file tree
Hide file tree
Showing 4 changed files with 134 additions and 156 deletions.
5 changes: 5 additions & 0 deletions src/gui/qgsgeometryrubberband.cpp
Expand Up @@ -75,6 +75,11 @@ QgsWkbTypes::GeometryType QgsGeometryRubberBand::geometryType() const
return mGeometryType;
}

void QgsGeometryRubberBand::setGeometryType( const QgsWkbTypes::GeometryType &geometryType )
{
mGeometryType = geometryType;
}

void QgsGeometryRubberBand::drawVertex( QPainter *p, double x, double y )
{
qreal s = ( mIconSize - 1 ) / 2.0;
Expand Down
3 changes: 3 additions & 0 deletions src/gui/qgsgeometryrubberband.h
Expand Up @@ -121,6 +121,9 @@ class GUI_EXPORT QgsGeometryRubberBand: public QgsMapCanvasItem
//! Returns which geometry is handled by the rubber band, polygon or line
QgsWkbTypes::GeometryType geometryType() const;

//! Sets which geometry is handled by the rubber band, polygon or line
void setGeometryType( const QgsWkbTypes::GeometryType &geometryType );

private:
std::unique_ptr<QgsAbstractGeometry> mGeometry = nullptr;
QBrush mBrush;
Expand Down

0 comments on commit 932151f

Please sign in to comment.