Martijn Laan 2 months ago
parent
commit
507be3cbad
1 changed files with 3 additions and 1 deletions
  1. 3 1
      Projects/Src/IDE.Wizard.WizardFileForm.pas

+ 3 - 1
Projects/Src/IDE.Wizard.WizardFileForm.pas

@@ -88,6 +88,8 @@ begin
   FWizardFile := WizardFile;
   FWizardFile := WizardFile;
 
 
   SourceEdit.Text := WizardFile.Source;
   SourceEdit.Text := WizardFile.Source;
+  if NewFileExists(SourceEdit.Text) then
+    RecurseSubDirsCheck.Enabled := False;
   RecurseSubDirsCheck.Checked := WizardFile.RecurseSubDirs;
   RecurseSubDirsCheck.Checked := WizardFile.RecurseSubDirs;
   CreateAllSubDirsCheck.Checked := WizardFile.CreateAllSubDirs;
   CreateAllSubDirsCheck.Checked := WizardFile.CreateAllSubDirs;
   if WizardFile.DestRootDirIsConstant then begin
   if WizardFile.DestRootDirIsConstant then begin
@@ -136,7 +138,7 @@ end;
 
 
 procedure TWizardFileForm.UpdateUI;
 procedure TWizardFileForm.UpdateUI;
 begin
 begin
-  CreateAllSubDirsCheck.Enabled := RecurseSubDirsCheck.Checked;
+  CreateAllSubDirsCheck.Enabled := RecurseSubDirsCheck.Enabled and RecurseSubDirsCheck.Checked;
 
 
   if DestRootDirComboBox.ItemIndex = DestRootDirComboBox.Items.Count-1 then begin
   if DestRootDirComboBox.ItemIndex = DestRootDirComboBox.Items.Count-1 then begin
     DestRootDirEdit.Enabled := True;
     DestRootDirEdit.Enabled := True;