mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-07-31 19:56:13 +02:00
Fix error if no connection found, and adapt load/save to changed verb indexes
git-svn-id: trunk@61454 -
This commit is contained in:
parent
87642bb738
commit
1c9f5af2ca
@ -503,7 +503,8 @@ begin
|
|||||||
try
|
try
|
||||||
Frm.Schema:=S;
|
Frm.Schema:=S;
|
||||||
cList:=GetSchemaConnections(S);
|
cList:=GetSchemaConnections(S);
|
||||||
Frm.Connections:=cList;
|
if Assigned(cList) then
|
||||||
|
Frm.Connections:=cList;
|
||||||
if Frm.ShowModal=mrOK then
|
if Frm.ShowModal=mrOK then
|
||||||
begin
|
begin
|
||||||
if Frm.SchemaModified then
|
if Frm.SchemaModified then
|
||||||
@ -520,6 +521,9 @@ end;
|
|||||||
|
|
||||||
procedure TSQLDBRestSchemaComponentEditor.ExecuteVerb(Index: Integer);
|
procedure TSQLDBRestSchemaComponentEditor.ExecuteVerb(Index: Integer);
|
||||||
|
|
||||||
|
Const
|
||||||
|
idxSave = 2;
|
||||||
|
|
||||||
Var
|
Var
|
||||||
FN : UTF8String;
|
FN : UTF8String;
|
||||||
S : TSQLDBRestSchema;
|
S : TSQLDBRestSchema;
|
||||||
@ -531,8 +535,8 @@ begin
|
|||||||
1,2 :
|
1,2 :
|
||||||
begin
|
begin
|
||||||
FN:=Component.Name+'.json';
|
FN:=Component.Name+'.json';
|
||||||
if GetFileName(FN, Format(SJSONFilesFilter, [allFilesMask]), Index=0) then
|
if GetFileName(FN, Format(SJSONFilesFilter, [allFilesMask]), Index=idxSave) then
|
||||||
if Index=0 then
|
if idxSave=2 then
|
||||||
S.SaveToFile(FN)
|
S.SaveToFile(FN)
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
|
Loading…
Reference in New Issue
Block a user