jfjoch_viewer: Handle autocontrast better
Some checks failed
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 11m39s
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 11m41s
Build Packages / Generate python client (push) Successful in 34s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 12m23s
Build Packages / Build documentation (push) Successful in 44s
Build Packages / Create release (push) Has been skipped
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 13m3s
Build Packages / build:rpm (rocky8) (push) Successful in 13m11s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 13m10s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 13m39s
Build Packages / build:rpm (rocky9) (push) Successful in 14m19s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 6m57s
Build Packages / Unit tests (push) Has been cancelled

This commit is contained in:
2025-11-14 17:24:47 +01:00
parent a4b6231ed8
commit 7608b93a0f
6 changed files with 26 additions and 12 deletions

View File

@@ -304,11 +304,12 @@ void JFJochDiffractionImage::loadImage(std::shared_ptr<const JFJochReaderImage>
void JFJochDiffractionImage::setAutoForeground(bool input) {
auto_fg = input;
if (image && auto_fg) {
// If auto_foreground is not set, then view stays with the current settings till these are explicitely changed
// If auto_foreground is not set, then view stays with the current settings till these are explicitly changed
foreground = image->GetAutoContrastValue();
emit foregroundChanged(foreground);
Redraw();
}
emit autoForegroundChanged(auto_fg);
}
void JFJochDiffractionImage::setResolutionRing(QVector<float> v) {
@@ -376,3 +377,9 @@ void JFJochDiffractionImage::highlightIceRings(bool input) {
highlight_ice_rings = input;
updateOverlay();
}
void JFJochDiffractionImage::changeForeground(float val) {
auto_fg = false;
emit autoForegroundChanged(false);
JFJochImage::changeForeground(val);
}