diff --git a/ideintf/propedits.pp b/ideintf/propedits.pp index 3b1cdf5487..56f61643b4 100644 --- a/ideintf/propedits.pp +++ b/ideintf/propedits.pp @@ -3460,11 +3460,12 @@ Type procedure RefreshPropertyValues; public procedure FillCollectionListBox; - constructor Create(TheOwner: TComponent); Override; + constructor Create(TheOwner: TComponent); override; destructor Destroy; override; procedure SelectInObjectInspector(UnselectAll: boolean); procedure SetCollection(NewCollection: TCollection; NewOwnerPersistent: TPersistent; const NewPropName: string); + procedure Modified; public property Collection: TCollection read FCollection; property OwnerPersistent: TPersistent read FOwnerPersistent; @@ -3486,6 +3487,7 @@ begin if Collection=nil then exit; Collection.Add; FillCollectionListBox; + Modified; end; procedure TCollectionPropertyEditorForm.DeleteClick(Sender: TObject); @@ -3527,6 +3529,7 @@ begin CollectionListBox.ItemIndex:=NewItemIndex; SelectInObjectInspector(false); end; + Modified; end; end; UpdateButtons; @@ -3542,6 +3545,7 @@ begin Collection.Items[i].Index:=i+1; CollectionListBox.ItemIndex:=i+1; FillCollectionListBox; + Modified; end; procedure TCollectionPropertyEditorForm.MoveUpButtonClick(Sender: TObject); @@ -3554,6 +3558,7 @@ begin Collection.Items[i].Index:=i-1; CollectionListBox.ItemIndex:=i-1; FillCollectionListBox; + Modified; end; procedure TCollectionPropertyEditorForm.UpdateCaption; @@ -3760,6 +3765,11 @@ begin FillCollectionListBox; end; +procedure TCollectionPropertyEditorForm.Modified; +begin + GlobalDesignHook.Modified(Self); +end; + // - - - - - - - - - - - - - - - - - - - - - - - - - - function TCollectionPropertyEditor.ReadElement(Index: integer): TPersistent; diff --git a/lcl/comctrls.pp b/lcl/comctrls.pp index 9033ce3bc5..8e91842c26 100644 --- a/lcl/comctrls.pp +++ b/lcl/comctrls.pp @@ -59,6 +59,8 @@ type ); TPanelParts = set of TPanelPart; + { TStatusPanel } + TStatusPanel = class(TCollectionItem) private FText: string; @@ -75,6 +77,7 @@ type protected function GetDisplayName: string; override; procedure PanelChanged(const Parts: TPanelParts); + procedure SetIndex(Value: Integer); override; public constructor Create(aCollection: TCollection); override; procedure Assign(Source: TPersistent); override; @@ -2300,6 +2303,9 @@ end. { ============================================================================= $Log$ + Revision 1.164 2005/02/21 01:08:19 mattias + fixed changing Index of TStatusPanel + Revision 1.163 2005/02/17 18:56:32 mattias line ends in debug output are now converted, added TTreeNode.FindNode diff --git a/lcl/include/statuspanel.inc b/lcl/include/statuspanel.inc index 189d41d587..31ae320dfa 100644 --- a/lcl/include/statuspanel.inc +++ b/lcl/include/statuspanel.inc @@ -62,6 +62,20 @@ begin TheStatusBar.InvalidatePanel(Index,Parts); end; +procedure TStatusPanel.SetIndex(Value: Integer); +var + OldIndex: LongInt; + TheStatusBar: TStatusBar; +begin + OldIndex:=Index; + if OldIndex=Value then exit; + //debugln('TStatusPanel.SetIndex A Test=',Text,' Old=',dbgs(OldIndex),' New=',dbgs(Value)); + inherited SetIndex(Value); + TheStatusBar:=StatusBar; + if TheStatusBar=nil then exit; + TheStatusBar.InvalidatePanel(-1,[ppText]); +end; + procedure TStatusPanel.SetAlignment(Value: TAlignment); begin if FAlignment <> Value then diff --git a/lcl/tests/test2_1buttonnavigation.lpi b/lcl/tests/test2_1buttonnavigation.lpi index 407432e7df..3b44918449 100644 --- a/lcl/tests/test2_1buttonnavigation.lpi +++ b/lcl/tests/test2_1buttonnavigation.lpi @@ -9,21 +9,21 @@ - + </General> <Units Count="1"> <Unit0> - <CursorPos X="30" Y="25"/> + <CursorPos X="13" Y="23"/> <EditorIndex Value="0"/> <Filename Value="test2_1buttonnavigation.lpr"/> <IsPartOfProject Value="True"/> <Loaded Value="True"/> <TopLine Value="1"/> <UnitName Value="test2_1buttonnavigation"/> - <UsageCount Value="44"/> + <UsageCount Value="72"/> </Unit0> </Units> <PublishOptions> diff --git a/lcl/tests/test2_1buttonnavigation.lpr b/lcl/tests/test2_1buttonnavigation.lpr index 43bce6c5cc..53a0a2e3cf 100644 --- a/lcl/tests/test2_1buttonnavigation.lpr +++ b/lcl/tests/test2_1buttonnavigation.lpr @@ -22,7 +22,7 @@ program test2_1buttonnavigation; uses Interfaces, FPCAdds, LCLProc, LCLType, Classes, Controls, Forms, TypInfo, - LMessages, Buttons, xinerama; + LMessages, Buttons; type