# HG changeset patch # User Teemu Piippo # Date 1522770957 -10800 # Node ID 83dd6cbd7f1ae8a33959e1bc193b0b72500ac2b4 # Parent 689121d162b6047a7b207d994afb02d0d2ddbc54 added an ini option to disable line stipple diff -r 689121d162b6 -r 83dd6cbd7f1a src/canvas.cpp --- a/src/canvas.cpp Tue Apr 03 17:37:33 2018 +0300 +++ b/src/canvas.cpp Tue Apr 03 18:55:57 2018 +0300 @@ -86,7 +86,10 @@ Vertex topLeft = currentCamera().idealize(currentCamera().convert2dTo3d({0, 0})); Vertex bottomRight = currentCamera().idealize(currentCamera().convert2dTo3d({width(), height()})); qreal gridSize = grid()->coordinateSnap(); - glEnable(GL_LINE_STIPPLE); + + if (config::useLineStipple()) + glEnable(GL_LINE_STIPPLE); + glBegin(GL_LINES); switch (grid()->type()) diff -r 689121d162b6 -r 83dd6cbd7f1a src/configurationoptions.txt --- a/src/configurationoptions.txt Tue Apr 03 17:37:33 2018 +0300 +++ b/src/configurationoptions.txt Tue Apr 03 18:55:57 2018 +0300 @@ -71,6 +71,7 @@ option MainWindowState = QByteArray {} option MainWindowGeometry = QByteArray {} option MainSplitterState = QByteArray {} +option UseLineStipple = true # File management options option Libraries = QVector {} diff -r 689121d162b6 -r 83dd6cbd7f1a src/glrenderer.cpp --- a/src/glrenderer.cpp Tue Apr 03 17:37:33 2018 +0300 +++ b/src/glrenderer.cpp Tue Apr 03 18:55:57 2018 +0300 @@ -435,7 +435,10 @@ } drawVbos (VboClass::Lines, VboSubclass::RegularColors); - glEnable (GL_LINE_STIPPLE); + + if (config::useLineStipple()) + glEnable (GL_LINE_STIPPLE); + drawVbos (VboClass::ConditionalLines, VboSubclass::RegularColors); glDisable (GL_LINE_STIPPLE);