|
@@ -86,6 +86,7 @@ type
|
|
|
procedure actnRenameUpdate(Sender: TObject);
|
|
|
procedure zgProjectsShowHint(var HintStr: String; var CanShow: Boolean;
|
|
|
var HintInfo: THintInfo; const ACoord: TPoint);
|
|
|
+ procedure actnExportUpdate(Sender: TObject);
|
|
|
private
|
|
|
FProjectManagerData: TProjectManagerData;
|
|
|
|
|
@@ -1407,15 +1408,19 @@ var
|
|
|
Rec: TsdDataRecord;
|
|
|
bNet: Boolean;
|
|
|
begin
|
|
|
- if stdProjects.IDTree.Selected = nil then Exit;
|
|
|
- Rec := stdProjects.IDTree.Selected.Rec;
|
|
|
- if Rec = nil then Exit;
|
|
|
- bNet := G_IsCloud;
|
|
|
- if bNet then
|
|
|
+ if Assigned(stdProjects.IDTree.Selected) and Assigned(stdProjects.IDTree.Selected.Rec) then
|
|
|
begin
|
|
|
- tobtnRenane.Enabled := (Rec.ValueByName('Type').AsInteger = 1) and
|
|
|
- (Rec.ValueByName('WebAuthorID').AsInteger = PHPWeb.UserID);
|
|
|
- end;
|
|
|
+ tobtnRenane.Enabled := True;
|
|
|
+ Rec := stdProjects.IDTree.Selected.Rec;
|
|
|
+ bNet := G_IsCloud;
|
|
|
+ if bNet then
|
|
|
+ begin
|
|
|
+ tobtnRenane.Enabled := (Rec.ValueByName('Type').AsInteger = 1) and
|
|
|
+ (Rec.ValueByName('WebAuthorID').AsInteger = PHPWeb.UserID);
|
|
|
+ end;
|
|
|
+ end
|
|
|
+ else
|
|
|
+ tobtnRenane.Enabled := False;
|
|
|
end;
|
|
|
|
|
|
procedure TProjectManagerFrame.CheckBidName(AID: Integer; ANewBidName: string);
|
|
@@ -1718,4 +1723,9 @@ begin
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
+procedure TProjectManagerFrame.actnExportUpdate(Sender: TObject);
|
|
|
+begin
|
|
|
+ TToolButton(Sender).Enabled := Assigned(stdProjects.IDTree.Selected);
|
|
|
+end;
|
|
|
+
|
|
|
end.
|