viewer: drop the cached pixel mask when switching HTTP source
cached_pixel_mask is keyed only on arm_date and was cleared only in Close(); ReadURL() reused it, so switching to a source whose start message has an empty or duplicate arm_date silently kept the previous source's mask (wrong pixels masked in the live preview and fed to spot-finding / azimuthal integration). Clear it in ReadURL() too, as Close() does. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -298,6 +298,10 @@ std::shared_ptr<JFJochReaderDataset> JFJochHttpReader::UpdateDataset_i() {
|
||||
void JFJochHttpReader::ReadURL(const std::string &url) {
|
||||
std::unique_lock ul(http_mutex);
|
||||
ResetConnection(); // selecting an address (re)opens the connection from scratch
|
||||
// Drop the previous source's cached mask: a different (or re-armed) source has its own mask, and
|
||||
// the arm_date key alone does not distinguish an empty/duplicate arm_date across sources.
|
||||
cached_pixel_mask.reset();
|
||||
cached_pixel_mask_arm_date.clear();
|
||||
addr = url;
|
||||
if (url.empty())
|
||||
SetStartMessage({});
|
||||
|
||||
Reference in New Issue
Block a user