[#850] Wire Qt visual whitepoint editor's embedded Measure button - #880
Merged
Conversation
…mp version to 3.10.0.dev48 Adds the Measure button wx's editor has to the Qt port (DisplayCAL/ui/tools/visual_whitepoint_editor.py), emitting measure_requested. MainWindow drives the actual spotread measurement (reusing _luminance_measure_producer, emissive mode) and feeds the result into the calibration whitepoint fields (colour temperature or x/y), plus a dimmed luminance target when the editor's own patch isn't full white, mirroring wx's ambient_measure_consumer. The network pattern-generator patch output half of #850 is split out into #879, tracked separately given its larger scope.
…p test CI (Linux + Python 3.10, pytest-xdist) failed test_visual_whitepoint_editor_measure_consumer_sets_colortemp_whitepoint: the implementation only proposes a colour-temp whitepoint when whitepoint_ctrl isn't already on x,y chromaticity, and this test relied on a fresh window's default state instead of pinning it, so a config leak from an earlier test in the same worker (whitepoint_ctrl.setCurrentIndex(2), never restored, matching this file's well-documented "config leaks between tests" trap) could pre-set it to index 2 and skip the branch under test. Pin the start state explicitly, matching every other whitepoint_ctrl test in this file.
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.
Summary
DisplayCAL/ui/tools/visual_whitepoint_editor.py). The button emitsmeasure_requested.MainWindowdrives the actual measurement (DisplayCAL/ui/main_window.py): runsspotreadin emissive mode (reusing_luminance_measure_producer), then feeds the result into the Calibration tab's whitepoint fields (colour temperature or x/y), plus a dimmed luminance target when the editor's own patch RGB isn't full white — mirroring wx'sambient_measure_consumerfor thevisual_whitepoint_editor_measure_btnbranch.Test plan
pytest tests/test_ui_main_window.py -k visual_whitepoint_editor_measure -v— 8 new tests, all passingpytest tests/test_ui_main_window.py -n auto— full suite (513 tests), no regressionspython -m DisplayCAL.ui.main_window) with a real instrument connected — maintainer confirmed the Measure button correctly reads the display and sets the whitepoint fields