Repository navigation
v0.29.3
What changed and why
Two fixes in CvInspect.Wpf. Both were reported by consumers who read the 0.29.2 source, and each was reproduced here
first: the new test fails on the code before the fix. No public type or member was added or removed. The other three
packages have no code change and are republished only to keep the four in lockstep.
Take this release if your host starts live asynchronously or can refuse a start (the ⏯ toggle could stay pressed with
nothing running), or if it switches CvLoc.Culture while the app runs and shows a CvPropEditCtrl (group headers stayed in
the first language).
CvDispCtrl — the ⏯ toggle now shows IsRunning, not the last click
The toggle only followed IsRunning when the value changed. When a click on ⏯ did not start live — the start was refused,
the command threw, no command was bound, or the view-model starts live asynchronously — IsRunning stayed false, no change
callback ran, and the button stayed pressed (green) with nothing running. Raising IsRunning = false again from the
view-model did not release it either, because the value did not change. The stop side was the same.
- After running
ContinuousCommandorStopCommand, the control now sets the toggle back toIsRunningstraight away.
If the command started live synchronously, the value is already true and nothing changes. If the view-model starts live
later, the button is released untilIsRunningbecomes true, then it is pressed by the normal change callback. - An exception from the command still propagates to the caller as before. The toggle is restored first.
- Regression
PlayToggleFollowsIsRunningNotTheClick(Wpf tests).
CvPropEditCtrl — group headers follow the current language
CvPropRowBldr keeps one attribute instance per property for the process lifetime. The standard
CategoryAttribute.Category translates once per instance and keeps that string (base behaviour; the property is not
virtual). So a group header stayed in the language in which that option type was first shown. The row labels
([CvName], [CvDesc]) are translated on every read and did follow a CvLoc.Culture change, so after a switch one editor
showed two languages. Because each tool type is first shown at a different time, headers could also differ from tool to tool.
- The header text is now read on every build.
[CvCategory]is translated from its key directly (the path its own
documentation recommends). Any otherCategoryAttributeis read from a new instance, so a subclass that translates in
GetLocalizedStringis translated again in the current language. - A missing translation still shows the key text, as before (
CvLoc.Tnever returns null). - The cost is one extra attribute read per property per build. The editor rebuilds only when
Source,ExecuteTextor
ShowDescchanges, not per frame. - Regression
HeadersFollowTheCultureOnRebuild(Wpf tests).
What can change for you when you upgrade from 0.29.2
- Bind
IsRunningif you bindContinuousCommand/StopCommand. A host that binds the commands but notIsRunning
used to get a toggle that alternated between them from its own click state. Now the toggle returns toIsRunningafter
every click. IfIsRunningis not bound it is always false: the toggle springs back to released and every click runs
ContinuousCommand— Stop can no longer be reached from it. The README quick start already bindsIsRunning
("the view-model is the source of truth"). Every host we know of binds it. - While an asynchronous start is in progress, the toggle reads released. A second click in that window runs
ContinuousCommandagain, notStopCommand. - After a
CvLoc.Cultureswitch, the next rebuild shows group headers in the new language, together with the row labels.
The editor still does not rebuild by itself on a culture switch: untilSource(orExecuteText/ShowDesc) changes,
it keeps what it shows, as before.
Version
0.29.3 — patch. No public type or member was added or removed. The behaviour changes are the ⏯ toggle state after a click
and the language of CvPropEditCtrl group headers. CvInspect, CvInspect.Imaging and CvInspect.Imaging.Gev have no
code change since 0.29.2. The four packages are released in lockstep.
Checks
-
dotnet build CvInspect.sln -c Release --no-incrementalreports 0 warnings - Tests: 56 (core) + 32 (Wpf) pass
- Both new regressions fail on the code before their fix. The toggle test asserts that a start that did not happen leaves
the toggle released. The header test got[Threshold, Others]in the new culture on the old code. - No camera is involved: both fixes are in the WPF controls and were verified with the test harness only.
-
mainis an ancestor of this branch (the release-pr-guard job verifies it) - the tag will be created on the merge commit,
mainmerged back intodevafterwards, anddevbumped to the next-devversion