View Issue Details

IDProjectCategoryView StatusLast Update
0037668LazarusIDEpublic2020-10-22 15:36
ReporterManlio Assigned ToJuha Manninen  
Status resolvedResolutionfixed 
PlatformWindows and Mac 
Product Version2.0.10 
Summary0037668: When reloading files changed on disk, IDE doesn't reload changes in LFM
DescriptionWhile a file e.g. UNIT1 is open in the IDE, and both PAS and LFM are modified on disk (e.g. by SVN Update), and you accept the prompt to reload the file from the disk, the source code (PAS file) is indeed reloaded, but the form (LFM) is not. The old form remains loaded in the IDE.

Only if you immediately manually close and reopen UNIT1, the new form is indeed reloaded. But if you make any changes to the form (e.g. add components, change size, etc.) then these changes will overwrite the changes on the disk, and all the changes received (e.g. via SVN Update) will be lost, and quite possibly break the build because there may no longer be a correspondence between components in the LFM and components in the source code.
Steps To Reproduce1. Have Unit1 with a form and a button and some code, open in the IDE.

2. Do a Subversion Update, in which Unit1 code has changed -- BOTH in the unit1.pas and in unit1.lfm. Let's say that a new button has been added to the form.

(Alternatively, manually change both .pas and .lfm files, in a text editor, while the IDE is also open)

3. When you go back to the IDE, you will receive the warning that the file on disk has changed, and you will be prompted to reload it. So far, so good.

4. Choose to reload the changed files from disk. This is where the bug takes place:
The unit1.pas file with the new code is indeed reloaded, but the form, from unit1.lfm, is NOT reloaded. You still see the old form with 1 button.

5. The work-around for this bug is to close unit1 immediately from the IDE, and then reopen it. Now the new new form, with two buttons, will be loaded.

6. Note: if you don't immediately close and reopen unit1 manually, if the form is changed in any way, e.g. the position on the screen, or components changed, then this change will overwrite any changes received with the Update -- indeed you will never even see the changes in the form that should have been reloaded with unit1 after the Update.

Additional InformationI noted this problem on both Windows and MacOS IDEs, versions 2.0.6 and 2.0.10 respectively.

The solution, obviously, is that after prompting the user to reload the changed files, both the source code (.pas) and the form file (lfm) should be reloaded, and not only the .pas file
TagsNo tags attached.
Fixed in Revisionr64048
Attached Files


duplicate of 0021587 resolvedJuha Manninen Changes in lfm files are not suggested to be re-load in the ide. 


Juha Manninen

2020-10-22 15:36

developer   ~0126460

Fixed together with 0021587.
Please test.

Issue History

Date Modified Username Field Change
2020-08-31 00:44 Manlio New Issue
2020-09-02 17:36 Juha Manninen Relationship added related to 0021587
2020-10-09 20:41 Juha Manninen Assigned To => Juha Manninen
2020-10-09 20:41 Juha Manninen Status new => assigned
2020-10-22 15:36 Juha Manninen Status assigned => resolved
2020-10-22 15:36 Juha Manninen Resolution open => fixed
2020-10-22 15:36 Juha Manninen Fixed in Revision => r64048
2020-10-22 15:36 Juha Manninen LazTarget => -
2020-10-22 15:36 Juha Manninen Note Added: 0126460
2020-10-22 15:36 Juha Manninen Relationship replaced duplicate of 0021587