Index: VerpakkingsDefinitie/ApplicationContext.pas =================================================================== diff -u -r564 -r570 --- VerpakkingsDefinitie/ApplicationContext.pas (.../ApplicationContext.pas) (revision 564) +++ VerpakkingsDefinitie/ApplicationContext.pas (.../ApplicationContext.pas) (revision 570) @@ -87,6 +87,7 @@ FInternalErrorMessage: string; public procedure NotifyChanged(); + procedure ResetSelectie(); property GeselecteerdProduct: TProductInformatie read FGeselecteerdProduct write FGeselecteerdProduct; property ProductDetailInformatie: OptiServerService.pxBoxData read FProductDetailInformatie write FProductDetailInformatie; @@ -166,11 +167,23 @@ self.Change(); end; +// PRODUCT DETAIL procedure TProductDetailContext.NotifyChanged(); begin self.Change(); end; +// Enkel updaten wanneer nog niet op nil stond. +procedure TProductDetailContext.ResetSelectie(); +begin + if (GeselecteerdProduct <> nil) or (ProductDetailInformatie <> nil) then + begin + GeselecteerdProduct := nil; + ProductDetailInformatie := nil; + NotifyChanged(); + end; +end; + // APPLICATION CONTEXT constructor TApplicationContext.Create(); begin