Skip to content
Permalink
Browse files

Change vertex marker to box and segment marker to double triangle

  • Loading branch information
wonder-sk committed Oct 27, 2017
1 parent b508bf7 commit b726ba29360ac5f4e5e076f643c833cbc5cf439f
Showing with 13 additions and 4 deletions.
  1. +2 −1 python/gui/qgsvertexmarker.sip
  2. +2 −2 src/gui/qgssnapindicator.cpp
  3. +7 −0 src/gui/qgsvertexmarker.cpp
  4. +2 −1 src/gui/qgsvertexmarker.h
@@ -37,7 +37,8 @@ class QgsVertexMarker : QgsMapCanvasItem
ICON_CROSS,
ICON_X,
ICON_BOX,
ICON_CIRCLE
ICON_CIRCLE,
ICON_DOUBLE_TRIANGLE,
};

QgsVertexMarker( QgsMapCanvas *mapCanvas /TransferThis/ );
@@ -57,13 +57,13 @@ void QgsSnapIndicator::setMatch( const QgsPointLocator::Match &match )
if ( match.hasVertex() )
{
if ( match.layer() )
iconType = QgsVertexMarker::ICON_CROSS; // vertex snap
iconType = QgsVertexMarker::ICON_BOX; // vertex snap
else
iconType = QgsVertexMarker::ICON_X; // intersection snap
}
else // must be segment snap
{
iconType = QgsVertexMarker::ICON_BOX;
iconType = QgsVertexMarker::ICON_DOUBLE_TRIANGLE;
}
mSnappingMarker->setIconType( iconType );

@@ -91,6 +91,13 @@ void QgsVertexMarker::paint( QPainter *p )
case ICON_CIRCLE:
p->drawEllipse( QPointF( 0, 0 ), s, s );
break;

case ICON_DOUBLE_TRIANGLE:
p->drawLine( QLineF( -s, -s, s, -s ) );
p->drawLine( QLineF( -s, s, s, s ) );
p->drawLine( QLineF( -s, -s, s, s ) );
p->drawLine( QLineF( s, -s, -s, s ) );
break;
}
}

@@ -53,7 +53,8 @@ class GUI_EXPORT QgsVertexMarker : public QgsMapCanvasItem
ICON_CROSS,
ICON_X,
ICON_BOX,
ICON_CIRCLE
ICON_CIRCLE,
ICON_DOUBLE_TRIANGLE, //!< Added in QGIS 3.0
};

QgsVertexMarker( QgsMapCanvas *mapCanvas SIP_TRANSFERTHIS );

0 comments on commit b726ba2

Please sign in to comment.
You can’t perform that action at this time.