mirror of https://gitlab.com/basile.b/dexed.git
dub editor, put action refresh in toolbar
This commit is contained in:
parent
0c1238095f
commit
aa368843b5
|
@ -1,7 +1,7 @@
|
|||
inherited CEDubProjectEditorWidget: TCEDubProjectEditorWidget
|
||||
Left = 1471
|
||||
Left = 771
|
||||
Height = 424
|
||||
Top = 10
|
||||
Top = 245
|
||||
Width = 411
|
||||
Caption = 'Dub project editor'
|
||||
ClientHeight = 424
|
||||
|
@ -28,7 +28,7 @@ inherited CEDubProjectEditorWidget: TCEDubProjectEditorWidget
|
|||
TabOrder = 0
|
||||
object TabSheet1: TTabSheet
|
||||
Caption = 'Inspector'
|
||||
ClientHeight = 388
|
||||
ClientHeight = 380
|
||||
ClientWidth = 395
|
||||
object pnlToolBar1: TPanel
|
||||
Left = 4
|
||||
|
@ -44,10 +44,10 @@ inherited CEDubProjectEditorWidget: TCEDubProjectEditorWidget
|
|||
ClientWidth = 387
|
||||
TabOrder = 0
|
||||
object fltInspect: TTreeFilterEdit
|
||||
Left = 2
|
||||
Left = 30
|
||||
Height = 22
|
||||
Top = 2
|
||||
Width = 383
|
||||
Width = 355
|
||||
ButtonWidth = 23
|
||||
NumGlyphs = 1
|
||||
Align = alClient
|
||||
|
@ -56,15 +56,27 @@ inherited CEDubProjectEditorWidget: TCEDubProjectEditorWidget
|
|||
TabOrder = 0
|
||||
FilteredTreeview = treeInspect
|
||||
end
|
||||
object btnRefresh: TBitBtn
|
||||
Left = 0
|
||||
Height = 26
|
||||
Hint = 'refresh the files and configurations'
|
||||
Top = 0
|
||||
Width = 28
|
||||
Align = alLeft
|
||||
Layout = blGlyphBottom
|
||||
OnClick = btnRefreshClick
|
||||
Spacing = 0
|
||||
TabOrder = 1
|
||||
end
|
||||
end
|
||||
object treeInspect: TTreeView
|
||||
Left = 4
|
||||
Height = 352
|
||||
Height = 344
|
||||
Top = 32
|
||||
Width = 387
|
||||
Align = alClient
|
||||
BorderSpacing.Around = 4
|
||||
DefaultItemHeight = 18
|
||||
DefaultItemHeight = 16
|
||||
DragMode = dmAutomatic
|
||||
HideSelection = False
|
||||
Images = imgList
|
||||
|
|
|
@ -29,6 +29,7 @@ type
|
|||
btnAcceptProp: TSpeedButton;
|
||||
btnAddProp: TSpeedButton;
|
||||
btnDelProp: TSpeedButton;
|
||||
btnRefresh: TBitBtn;
|
||||
edProp: TEdit;
|
||||
fltEdit: TTreeFilterEdit;
|
||||
imgList: TImageList;
|
||||
|
@ -45,6 +46,7 @@ type
|
|||
procedure btnAcceptPropClick(Sender: TObject);
|
||||
procedure btnAddPropClick(Sender: TObject);
|
||||
procedure btnDelPropClick(Sender: TObject);
|
||||
procedure btnRefreshClick(Sender: TObject);
|
||||
procedure MenuItem1Click(Sender: TObject);
|
||||
procedure propTreeSelectionChanged(Sender: TObject);
|
||||
procedure treeInspectDblClick(Sender: TObject);
|
||||
|
@ -147,6 +149,7 @@ begin
|
|||
AssignPng(btnAddProp, 'textfield_add');
|
||||
AssignPng(btnDelProp, 'textfield_delete');
|
||||
AssignPng(btnAcceptProp, 'accept');
|
||||
AssignPng(btnRefresh, 'arrow_update');
|
||||
end;
|
||||
|
||||
procedure TCEDubProjectEditorWidget.SetVisible(Value: boolean);
|
||||
|
@ -315,11 +318,18 @@ begin
|
|||
updateValueEditor;
|
||||
end;
|
||||
|
||||
procedure TCEDubProjectEditorWidget.btnRefreshClick(Sender: TObject);
|
||||
begin
|
||||
if fProj.isNil or not fProj.filename.fileExists then
|
||||
exit;
|
||||
fProj.loadFromFile(fProj.filename);
|
||||
end;
|
||||
|
||||
procedure TCEDubProjectEditorWidget.MenuItem1Click(Sender: TObject);
|
||||
begin
|
||||
if fProj.isNil then exit;
|
||||
fProj.beginModification;
|
||||
fProj.endModification;
|
||||
if fProj.isNil or not fProj.filename.fileExists then
|
||||
exit;
|
||||
fProj.loadFromFile(fProj.filename);
|
||||
end;
|
||||
|
||||
procedure TCEDubProjectEditorWidget.setJsonValueFromEditor;
|
||||
|
|
Loading…
Reference in New Issue