Skip to content

Commit

Permalink
Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
albireo77 committed Jan 6, 2025
1 parent afd634b commit 4f400d4
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
6 changes: 3 additions & 3 deletions Blocks/Base_Block.pas
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ TBlock = class(TCustomControl, IWithId, IWithFocus, IExportable, IMemoEx)
procedure SetPage(APage: TBlockTabSheet); virtual;
function GetPage: TBlockTabSheet; virtual;
procedure CreateParams(var Params: TCreateParams); override;
procedure OnCommentPosChanging(AComment: TComment; dx, dy: integer); virtual;
procedure MoveComment(AComment: TComment; dx, dy: integer); virtual;
function ProcessComments: boolean;
function IsAncestor(AParent: TObject): boolean;
function GetErrorMsg(AEdit: TCustomEdit): string;
Expand Down Expand Up @@ -1076,7 +1076,7 @@ procedure TBlock.WMWindowPosChanging(var Msg: TWMWindowPosChanging);
if (dx <> 0) or (dy <> 0) then
begin
for var comment in GetComments(True) do
OnCommentPosChanging(comment, dx, dy);
MoveComment(comment, dx, dy);
end;
end;
inherited;
Expand All @@ -1089,7 +1089,7 @@ procedure TBlock.WMWindowPosChanged(var Msg: TWMWindowPosChanged);
inherited;
end;

procedure TBlock.OnCommentPosChanging(AComment: TComment; dx, dy: integer);
procedure TBlock.MoveComment(AComment: TComment; dx, dy: integer);
begin
if not AComment.Moved then
begin
Expand Down
4 changes: 2 additions & 2 deletions Blocks/Main_Block.pas
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ TMainBlock = class(TGroupBlock, IWinControl)
FStopLabel: string;
procedure MouseMove(Shift: TShiftState; X, Y: Integer); override;
procedure Paint; override;
procedure OnCommentPosChanging(AComment: TComment; dx, dy: integer); override;
procedure MoveComment(AComment: TComment; dx, dy: integer); override;
procedure SetPage(APage: TBlockTabSheet); override;
function GetFunctionLabel(var ARect: TRect): string;
function GetPage: TBlockTabSheet; override;
Expand Down Expand Up @@ -466,7 +466,7 @@ function TMainBlock.IsBoldDesc: boolean;
result := True;
end;

procedure TMainBlock.OnCommentPosChanging(AComment: TComment; dx, dy: integer);
procedure TMainBlock.MoveComment(AComment: TComment; dx, dy: integer);
begin
if AComment.Visible then
TInfra.MoveWinTopZ(AComment, AComment.Left+dx, AComment.Top+dy);
Expand Down
3 changes: 3 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
11.8 [06-01-2025]
- Flowchart: fix comments in wrong position after inserting new block

11.7 [28-12-2024]
- further improvements to look better on Windows 11

Expand Down
2 changes: 1 addition & 1 deletion Forms/About_Form.pas
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ procedure TAboutForm.FormCreate(Sender: TObject);
This program is freeware and released under the
GNU General Public License.
The %s project (2006-2024)
The %s project (2006-2025)
''';
WIN_PLATFORM = {$IFDEF WIN32}32{$ELSE}64{$ENDIF};
begin
Expand Down

0 comments on commit 4f400d4

Please # to comment.