Skip to content
  • Dmitry Kazakov's avatar
    Fix resetting the paint device cache on every iterator completion · 02ac4216
    Dmitry Kazakov authored
    This bug should have happened one day. We should reset the paint device
    cache not only on the creation of the iterator, but also on its
    completion.
    
    The actual bug happened because of concurrency, while the stroke was
    filling the selection, an delayed updateGUI() in the status bar
    requested selection->selectedExactRect(), which effectively updated the
    cache with empty rect (which it was at that moment). And when the
    iterator completed with the updated seleciton, the cache was already
    initialized with wrong (empty) rect.
    
    Now all the iterators notify the paint device about their completion
    using a special interface, therefore the problem cannot happen, all
    the editing event will be synchronized.
    
    BUG:374142
    02ac4216