You've already forked lazarus-ccr
* Fix crash when adding button
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1736 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -115,14 +115,12 @@ implementation
|
|||||||
|
|
||||||
{ TfrmEditWindow }
|
{ TfrmEditWindow }
|
||||||
|
|
||||||
|
function CreateLargeButton(Pane : TSpkPane) : TSpkBaseItem;
|
||||||
|
begin
|
||||||
|
result:=Pane.Items.AddLargeButton;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TfrmEditWindow.aAddLargeButtonExecute(Sender: TObject);
|
procedure TfrmEditWindow.aAddLargeButtonExecute(Sender: TObject);
|
||||||
|
|
||||||
function CreateLargeButton(Pane : TSpkPane) : TSpkBaseItem;
|
|
||||||
|
|
||||||
begin
|
|
||||||
result:=Pane.Items.AddLargeButton;
|
|
||||||
end;
|
|
||||||
|
|
||||||
begin
|
begin
|
||||||
if (FToolbar=nil) or (FDesigner=nil) then
|
if (FToolbar=nil) or (FDesigner=nil) then
|
||||||
exit;
|
exit;
|
||||||
@ -151,7 +149,7 @@ if Node.Data = nil then
|
|||||||
Obj:=TObject(Node.Data);
|
Obj:=TObject(Node.Data);
|
||||||
if Obj is TSpkTab then
|
if Obj is TSpkTab then
|
||||||
begin
|
begin
|
||||||
Tab:=Obj as TSpkTab;
|
Tab:=TSpkTab(Obj);
|
||||||
Pane:=Tab.Panes.Add;
|
Pane:=Tab.Panes.Add;
|
||||||
NewNode:=tvStructure.Items.AddChild(Node, Pane.Caption);
|
NewNode:=tvStructure.Items.AddChild(Node, Pane.Caption);
|
||||||
NewNode.Data:=Pane;
|
NewNode.Data:=Pane;
|
||||||
@ -200,14 +198,13 @@ if Obj is TSpkBaseItem then
|
|||||||
raise exception.create('TfrmEditWindow.aAddPaneExecute: Nieprawid�owy obiekt podwieszony pod ga��zi�!');
|
raise exception.create('TfrmEditWindow.aAddPaneExecute: Nieprawid�owy obiekt podwieszony pod ga��zi�!');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function CreateSmallButton(Pane : TSpkPane) : TSpkBaseItem;
|
||||||
|
|
||||||
|
begin
|
||||||
|
result:=Pane.Items.AddSmallButton;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TfrmEditWindow.aAddSmallButtonExecute(Sender: TObject);
|
procedure TfrmEditWindow.aAddSmallButtonExecute(Sender: TObject);
|
||||||
|
|
||||||
function CreateSmallButton(Pane : TSpkPane) : TSpkBaseItem;
|
|
||||||
|
|
||||||
begin
|
|
||||||
result:=Pane.Items.AddSmallButton;
|
|
||||||
end;
|
|
||||||
|
|
||||||
begin
|
begin
|
||||||
if (FToolbar=nil) or (FDesigner=nil) then
|
if (FToolbar=nil) or (FDesigner=nil) then
|
||||||
exit;
|
exit;
|
||||||
@ -258,7 +255,7 @@ if Node.Data = nil then
|
|||||||
Obj:=TObject(Node.Data);
|
Obj:=TObject(Node.Data);
|
||||||
if Obj is TSpkPane then
|
if Obj is TSpkPane then
|
||||||
begin
|
begin
|
||||||
Pane:=Obj as TSpkPane;
|
Pane:=TSpkPane(Obj);
|
||||||
Item:=CreateItemFunc(Pane);
|
Item:=CreateItemFunc(Pane);
|
||||||
s:=GetItemCaption(Item);
|
s:=GetItemCaption(Item);
|
||||||
NewNode:=tvStructure.Items.AddChild(Node, s);
|
NewNode:=tvStructure.Items.AddChild(Node, s);
|
||||||
@ -556,7 +553,7 @@ else
|
|||||||
end else
|
end else
|
||||||
if Obj is TSpkPane then
|
if Obj is TSpkPane then
|
||||||
begin
|
begin
|
||||||
Pane:=Obj as TSpkPane;
|
Pane:=TSpkPane(Obj);
|
||||||
|
|
||||||
if not(CheckValidPaneNode(Node)) then
|
if not(CheckValidPaneNode(Node)) then
|
||||||
raise exception.create('TfrmEditWindow.CheckActionsAvailability: Uszkodzona struktura drzewa!');
|
raise exception.create('TfrmEditWindow.CheckActionsAvailability: Uszkodzona struktura drzewa!');
|
||||||
@ -581,7 +578,7 @@ else
|
|||||||
end else
|
end else
|
||||||
if Obj is TSpkBaseItem then
|
if Obj is TSpkBaseItem then
|
||||||
begin
|
begin
|
||||||
Item:=Obj as TSpkBaseItem;
|
Item:=TSpkBaseItem(Obj);
|
||||||
|
|
||||||
if not(CheckValidItemNode(Node)) then
|
if not(CheckValidItemNode(Node)) then
|
||||||
raise exception.create('TfrmEditWindow.CheckActionsAvailability: Uszkodzona struktura drzewa!');
|
raise exception.create('TfrmEditWindow.CheckActionsAvailability: Uszkodzona struktura drzewa!');
|
||||||
|
Reference in New Issue
Block a user