Skip to content

Commit

Permalink
ImageGadget : Fix active not being reset when reverting to stored tile
Browse files Browse the repository at this point in the history
  • Loading branch information
danieldresser committed Nov 13, 2020
1 parent f01a4da commit aa001e2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions Changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Fixes
-----

- Checkerboard : Checker colors are now exactly equal to the colorA and colorB parameters. Previously, there were very tiny floating point errors which grew larger as the distance from origin increased.
- Image Viewer : Fix active tile indicators getting stuck when switching back to cached value partway through compute

0.59.0.0b3 (relative to 0.59.0.0b2)
==========
Expand Down
5 changes: 5 additions & 0 deletions src/GafferImageUI/ImageGadget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -901,6 +901,11 @@ ImageGadget::Tile::Update ImageGadget::Tile::computeUpdate( const GafferImage::I
Mutex::scoped_lock lock( m_mutex );
if( m_channelDataHash != MurmurHash() && m_channelDataHash == h )
{
// We can just keep the current value, since the hash matches. Set active to false,
// in case we were halfway through an update that got cancelled before switching back
// to a hash that matches the stored value.
m_active = false;

return Update{ nullptr, nullptr, MurmurHash() };
}

Expand Down

0 comments on commit aa001e2

Please sign in to comment.