Skip to content

Commit 201aec2

Browse files
committed
Use helper functions
1 parent f29f2e9 commit 201aec2

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

ExampleViewOpenGL/src/ExampleGLWidget.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ ExampleGLWidget::ExampleGLWidget() :
99
QOpenGLWidget(),
1010
_isInitialized(false),
1111
_backgroundColor(235, 235, 235, 255),
12-
_pointRenderer(),
12+
_pointRenderer(this),
1313
_pixelRatio(1.0f),
1414
_points(),
1515
_colors()
@@ -39,8 +39,6 @@ ExampleGLWidget::ExampleGLWidget() :
3939
surfaceFormat.setSamples(16);
4040

4141
setFormat(surfaceFormat);
42-
43-
_pointRenderer.getNavigator().initialize(this);
4442
}
4543

4644
ExampleGLWidget::~ExampleGLWidget()
@@ -83,7 +81,7 @@ void ExampleGLWidget::setData(const std::vector<mv::Vector2f>& points, float poi
8381
_pointRenderer.setPointSize(pointSize);
8482
_pointRenderer.setAlpha(pointOpacity);
8583

86-
_pointRenderer.getNavigator().resetView(true);
84+
_pointRenderer.initView();
8785

8886
// Calls paintGL()
8987
update();

0 commit comments

Comments
 (0)