mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-25 22:50:25 -05:00
IconProvider::operator= copied a new resource-string but never cleared the existing m_pixmap. icon() prefers the pixmap when present, so a pixmap-based default stamped earlier (e.g. by a base class) would silently shadow a later resource-string-only assignment in a derived class. Reset m_pixmap in operator= so resource-string-only assignments fully replace pixmap-based ones, and cover the replacement semantics with a caf::IconProvider regression test: default-overwriting-pixmap, resource-string-overwriting-pixmap and pixmap-overwriting-pixmap. Needed for the upcoming nested-collection migration where a base class stamps a folder pixmap and the topmost instance applies a branded resource-string icon on top.