From a57f07c22b843ef1ec01e9ba35c22848a9709640 Mon Sep 17 00:00:00 2001 From: "Pfeil, Scott Robert" Date: Wed, 15 Apr 2020 17:42:57 -0400 Subject: [PATCH] remove previous items --- MVMCoreUI/Atomic/Organisms/MoleculeStackView.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/MVMCoreUI/Atomic/Organisms/MoleculeStackView.swift b/MVMCoreUI/Atomic/Organisms/MoleculeStackView.swift index 3965932d..e0517d45 100644 --- a/MVMCoreUI/Atomic/Organisms/MoleculeStackView.swift +++ b/MVMCoreUI/Atomic/Organisms/MoleculeStackView.swift @@ -46,6 +46,7 @@ open class MoleculeStackView: Stack { open override func setStackItemsFromModel(_ model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable : Any]?) { // If the items in the stack are different, clear them, create new ones. if (previousModel == nil) || Self.nameForReuse(with: previousModel!, delegateObject) != Self.nameForReuse(with: model, delegateObject) { + removeAllItemViews() stackItems = [] createStackItemsFromModel(model, delegateObject, additionalData) } else {