Skip to content

Commit

Permalink
contrast GUI: convert new minimum and maximum values to float (#311)
Browse files Browse the repository at this point in the history
fix contrast GUI for `Normed` values
  • Loading branch information
jwahlstrand authored Jun 10, 2024
1 parent 27fb192 commit f82a240
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "ImageView"
uuid = "86fae568-95e7-573e-a6b2-d8a6b900c9ef"
author = ["Tim Holy <[email protected]"]
version = "0.12.4"
version = "0.12.5"

[deps]
AxisArrays = "39de3d68-74b9-583c-8d2d-e117c070f3a9"
Expand Down
4 changes: 2 additions & 2 deletions src/contrast_gui.jl
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ function contrast_gui(enabled::Observable{Bool}, hist::Observable, clim::Observa
mn, mx = minimum(rng), maximum(rng)
cmin, cmax = T(clamp(cminT, mn, mx)), T(clamp(cmaxT, mn, mx))
if cmin != cgui["slider_min"][] || cmax != cgui["slider_max"][]
cgui["slider_min"][] = (rng, cmin)
cgui["slider_max"][] = (rng, cmax)
cgui["slider_min"][] = (rng, float(cmin))
cgui["slider_max"][] = (rng, float(cmax))
end
end
# Update the image contrast
Expand Down

0 comments on commit f82a240

Please sign in to comment.