Changeset 156 for trunk/Forms


Ignore:
Timestamp:
Aug 19, 2024, 8:35:07 AM (3 months ago)
Author:
chronos
Message:
  • Modified: Automatically open example file on first start.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/FormMain.pas

    r155 r156  
    212212  PageControlMain.TabIndex := 0;
    213213  try
     214    if Core.Core.LastOpenedList.Items.Count = 0 then
     215      Core.Core.LastOpenedList.Items.Add(CombinePaths(Core.Core.DataDir, ExamplesDir + DirectorySeparator + 'Sierpinski.b'));
     216
    214217    if Core.Core.OpenProjectOnStart and (Core.Core.LastOpenedList.Items.Count > 0) and
    215218      FileExists(Core.Core.LastOpenedList.Items[0]) then
     
    744747begin
    745748  if Core.Core.LastOpenedList.Items.Count > 0 then
    746     FileName := Core.Core.LastOpenedList.Items[0]
    747     else FileName := CombinePaths(Core.Core.DataDir, ExamplesDir);
     749    FileName := Core.Core.LastOpenedList.Items[0];
    748750  OpenDialog1.InitialDir := ExtractFileDir(FileName);
    749751  OpenDialog1.FileName := ExtractFileName(FileName);
Note: See TracChangeset for help on using the changeset viewer.