diff options
author | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2010-10-05 12:00:54 +0200 |
---|---|---|
committer | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2010-10-05 12:00:54 +0200 |
commit | d18891353ff8af30d2e8d858f26ef5a7dbe1eac0 (patch) | |
tree | c335b5af0359f1b043ef047fcdf217d838347101 /extras | |
parent | 0807384487c04bf2898c0d2fbb51047683af7c8e (diff) | |
download | fpGUI-d18891353ff8af30d2e8d858f26ef5a7dbe1eac0.tar.xz |
StringGrid mediator was missing SetActive() implementation.
This meant ClearList was never called anywhere.
ClearList() was also slightly incorrect in the ListView mediator.
Diffstat (limited to 'extras')
-rw-r--r-- | extras/tiopf/gui/tiListMediators.pas | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/extras/tiopf/gui/tiListMediators.pas b/extras/tiopf/gui/tiListMediators.pas index 1185607c..0eecb535 100644 --- a/extras/tiopf/gui/tiListMediators.pas +++ b/extras/tiopf/gui/tiListMediators.pas @@ -57,6 +57,7 @@ type procedure SetupGUIandObject; override; procedure ClearList; override; procedure RebuildList; override; + procedure SetActive(const AValue: Boolean); override; public constructor CreateCustom(AModel: TtiObjectList; AGrid: TfpgStringGrid; ADisplayNames: string; AIsObserving: Boolean = True); reintroduce; overload; destructor Destroy; override; @@ -249,9 +250,9 @@ end; procedure TtiListViewMediatorView.SetActive(const AValue: Boolean); begin + inherited SetActive(AValue); if not AValue then ClearList; - inherited SetActive(AValue); end; constructor TtiListViewMediatorView.CreateCustom(AModel: TtiObjectList; AView: TfpgListView; AOnBeforeSetupField: TtiOnBeforeSetupField; ADisplayNames: string; AIsObserving: Boolean); @@ -521,6 +522,13 @@ begin end; end; +procedure TtiStringGridMediatorView.SetActive(const AValue: Boolean); +begin + inherited SetActive(AValue); + if not AValue then + ClearList; +end; + constructor TtiStringGridMediatorView.CreateCustom(AModel: TtiObjectList; AGrid: TfpgStringGrid; ADisplayNames: string; AIsObserving: Boolean); begin inherited Create; |