Skip to content

Commit b5371b2

Browse files
committed
Move initialization to header
1 parent 3744043 commit b5371b2

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/gui/qgssnaptogridcanvasitem.cpp

-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@
1818

1919
QgsSnapToGridCanvasItem::QgsSnapToGridCanvasItem( QgsMapCanvas *mapCanvas )
2020
: QgsMapCanvasItem( mapCanvas )
21-
, mGridPen( QPen( QColor( 127, 127, 127, 150 ), 1 ) )
22-
, mCurrentPointPen( QPen( QColor( 200, 200, 200, 150 ), 3 ) )
2321
{
2422
updateMapCanvasCrs();
2523
connect( mMapCanvas, &QgsMapCanvas::extentsChanged, this, &QgsSnapToGridCanvasItem::updateZoomFactor );

src/gui/qgssnaptogridcanvasitem.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,8 @@ class GUI_EXPORT QgsSnapToGridCanvasItem : public QObject, public QgsMapCanvasIt
9999
void updateZoomFactor();
100100

101101
private:
102-
QPen mGridPen;
103-
QPen mCurrentPointPen;
102+
QPen mGridPen = QPen( QColor( 127, 127, 127, 150 ) );
103+
QPen mCurrentPointPen = QPen( QColor( 200, 200, 200, 150 ) );
104104

105105
bool mEnabled = true;
106106
bool mAvailableByZoomFactor = false;

0 commit comments

Comments
 (0)