mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-21 23:59:24 +02:00
IDE: Remove Application.Scaled line from source also when Project1.Scaled=False.
git-svn-id: trunk@62579 -
This commit is contained in:
parent
034fb259c2
commit
7cfe7dc26d
@ -4320,13 +4320,13 @@ begin
|
|||||||
TitleStat := '';
|
TitleStat := '';
|
||||||
CodeToolBoss.GetApplicationTitleStatement(Project1.MainUnitInfo.Source, TitleStat);
|
CodeToolBoss.GetApplicationTitleStatement(Project1.MainUnitInfo.Source, TitleStat);
|
||||||
ProjTitle:=Project1.GetTitle;
|
ProjTitle:=Project1.GetTitle;
|
||||||
//DebugLn(['ProjectOptionsAfterWrite: Project title=',ProjTitle,
|
//DebugLn(['UpdateAppTitleInSource: Project title=',ProjTitle,
|
||||||
// ', Default=',Project1.GetDefaultTitle,', Title Statement=',TitleStat]);
|
// ', Default=',Project1.GetDefaultTitle,', Title Statement=',TitleStat]);
|
||||||
if pfMainUnitHasTitleStatement in Project1.Flags then
|
if pfMainUnitHasTitleStatement in Project1.Flags then
|
||||||
begin // Add Title statement if not there already.
|
begin // Add Title statement if not there already.
|
||||||
if ((TitleStat = '') or (TitleStat = ProjTitle)) and Project1.TitleIsDefault then
|
if ((TitleStat = '') or (TitleStat = ProjTitle)) and Project1.TitleIsDefault then
|
||||||
Exit;
|
Exit;
|
||||||
//DebugLn(['ProjectOptionsAfterWrite: Setting Title to ',ProjTitle]);
|
//DebugLn(['UpdateAppTitleInSource: Setting Title to ',ProjTitle]);
|
||||||
if not CodeToolBoss.SetApplicationTitleStatement(Project1.MainUnitInfo.Source, ProjTitle) then
|
if not CodeToolBoss.SetApplicationTitleStatement(Project1.MainUnitInfo.Source, ProjTitle) then
|
||||||
begin
|
begin
|
||||||
IDEMessageDialog(lisProjOptsError,
|
IDEMessageDialog(lisProjOptsError,
|
||||||
@ -4338,7 +4338,7 @@ begin
|
|||||||
else begin // Remove Title statement if it is there.
|
else begin // Remove Title statement if it is there.
|
||||||
if TitleStat <> ProjTitle then
|
if TitleStat <> ProjTitle then
|
||||||
Exit;
|
Exit;
|
||||||
//DebugLn(['ProjectOptionsAfterWrite: Removing Title']);
|
//DebugLn(['UpdateAppTitleInSource: Removing Title']);
|
||||||
if not CodeToolBoss.RemoveApplicationTitleStatement(Project1.MainUnitInfo.Source) then
|
if not CodeToolBoss.RemoveApplicationTitleStatement(Project1.MainUnitInfo.Source) then
|
||||||
begin
|
begin
|
||||||
IDEMessageDialog(lisProjOptsError,
|
IDEMessageDialog(lisProjOptsError,
|
||||||
@ -4357,12 +4357,12 @@ begin
|
|||||||
ScaledStat := False;
|
ScaledStat := False;
|
||||||
CodeToolBoss.GetApplicationScaledStatement(Project1.MainUnitInfo.Source, ScaledStat);
|
CodeToolBoss.GetApplicationScaledStatement(Project1.MainUnitInfo.Source, ScaledStat);
|
||||||
ProjScaled:=Project1.Scaled;
|
ProjScaled:=Project1.Scaled;
|
||||||
//DebugLn(['ProjectOptionsAfterWrite: Project Scaled=',ProjScaled,', Scaled Statement=',ScaledStat]);
|
//DebugLn(['UpdateAppScaledInSource: Project Scaled=',ProjScaled,', Scaled Statement=',ScaledStat]);
|
||||||
if pfMainUnitHasScaledStatement in Project1.Flags then
|
if pfMainUnitHasScaledStatement in Project1.Flags then
|
||||||
begin // Add Scaled statement if not there already.
|
begin // Add Scaled statement if not there already.
|
||||||
if (ScaledStat = ProjScaled) or not ProjScaled then
|
if (ScaledStat = ProjScaled) or not ProjScaled then
|
||||||
Exit;
|
Exit;
|
||||||
//DebugLn(['ProjectOptionsAfterWrite: Setting Scaled to ',ProjScaled]);
|
//DebugLn(['UpdateAppScaledInSource: Setting Scaled to ',ProjScaled]);
|
||||||
if not CodeToolBoss.SetApplicationScaledStatement(Project1.MainUnitInfo.Source, ProjScaled) then
|
if not CodeToolBoss.SetApplicationScaledStatement(Project1.MainUnitInfo.Source, ProjScaled) then
|
||||||
begin
|
begin
|
||||||
IDEMessageDialog(lisProjOptsError,
|
IDEMessageDialog(lisProjOptsError,
|
||||||
@ -4372,9 +4372,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end
|
end
|
||||||
else begin // Remove Scaled statement if it is there.
|
else begin // Remove Scaled statement if it is there.
|
||||||
if ScaledStat <> ProjScaled then
|
//DebugLn(['UpdateAppScaledInSource: Removing Scaled']);
|
||||||
Exit;
|
|
||||||
//DebugLn(['ProjectOptionsAfterWrite: Removing Scaled']);
|
|
||||||
if not CodeToolBoss.RemoveApplicationScaledStatement(Project1.MainUnitInfo.Source) then
|
if not CodeToolBoss.RemoveApplicationScaledStatement(Project1.MainUnitInfo.Source) then
|
||||||
begin
|
begin
|
||||||
IDEMessageDialog(lisProjOptsError,
|
IDEMessageDialog(lisProjOptsError,
|
||||||
|
Loading…
Reference in New Issue
Block a user