PlotSpeedTest: reflect initial use_opengl state#2487
Merged
j9ac9k merged 1 commit intopyqtgraph:masterfrom Oct 26, 2022
Merged
Conversation
Member
|
Gonna ask @ntjess to make sure this is setup as it's supposed to. |
Contributor
Would it work to simply address @@ -35,6 +35,7 @@ args = parser.parse_args()
if args.use_opengl is not None:
pg.setConfigOption('useOpenGL', args.use_opengl)
pg.setConfigOption('enableExperimental', args.use_opengl)
+use_opengl = pg.getConfigOption('useOpenGL')
# don't limit frame rate to vsync
sfmt = QtGui.QSurfaceFormat()
@@ -151,11 +152,11 @@ def updateOptions(
curvePen=pg.mkPen(),
plotMethod='pyqtgraph',
fillLevel=False,
- enableExperimental=False,
- useOpenGL=False,
+ enableExperimental=use_opengl,
+ useOpenGL=use_opengl,
):
pg.setConfigOption('enableExperimental', enableExperimental)
- pg.setConfigOption('useOpenGL', useOpenGL)
+ pw.useOpenGL(useOpenGL)
curve.setPen(curvePen)
curve.setFillLevel(0.0 if fillLevel else None)
curve.setMethod(plotMethod)
|
6a9ccc3 to
a1182d9
Compare
Contributor
Author
|
I tried out your version and it seems like it's not such a big penalty to reset the I have changed the PR to use your version instead. |
Contributor
|
👍 LGTM. I might make a separate PR to determine if the current viewport already matches |
Member
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Since #2318, when enabling OpenGL from the command line, the associated checkboxes were not reflecting the initial state.
Also, toggling OpenGL would have no effect as
GraphicsView::useOpenGL()needs to be called.