effectshandler: Reset iterators when active effects changes

Clearing and resizing m_activeEffects invalidates iterators, so we need
to ensure we reset any iterators that were stored.
This commit is contained in:
Arjen Hiemstra 2022-10-25 16:26:17 +02:00
parent 4c8fd4b8ca
commit 11dc73c6ce

View file

@ -1574,6 +1574,10 @@ void EffectsHandlerImpl::effectsChanged()
std::back_inserter(loaded_effects));
m_activeEffects.reserve(loaded_effects.count());
m_currentPaintScreenIterator = m_activeEffects.constBegin();
m_currentPaintWindowIterator = m_activeEffects.constBegin();
m_currentDrawWindowIterator = m_activeEffects.constBegin();
}
QStringList EffectsHandlerImpl::activeEffects() const