Browse Source

Disable Delete button while finding files

Source commit: b6aac639b6a76e99ab35dae7f693679a8ce811ca
Martin Prikryl 9 years ago
parent
commit
6b760feb9f
1 changed files with 2 additions and 1 deletions
  1. 2 1
      source/forms/FileFind.cpp

+ 2 - 1
source/forms/FileFind.cpp

@@ -110,7 +110,8 @@ void __fastcall TFileFindDialog::UpdateControls()
   StartStopButton->Caption = StartStopCaption;
   StartStopButton->Caption = StartStopCaption;
   EnableControl(FilterGroup, !Finding);
   EnableControl(FilterGroup, !Finding);
   FocusAction->Enabled = (FileView->ItemFocused != NULL);
   FocusAction->Enabled = (FileView->ItemFocused != NULL);
-  DeleteAction->Enabled = (FileView->SelCount > 0);
+  bool EnableFileOperations = !Finding && (FileView->SelCount > 0);
+  DeleteAction->Enabled = EnableFileOperations;
   CopyAction->Enabled = (FileView->Items->Count > 0);
   CopyAction->Enabled = (FileView->Items->Count > 0);
   SelectAllAction->Enabled = (FileView->SelCount < FileView->Items->Count);
   SelectAllAction->Enabled = (FileView->SelCount < FileView->Items->Count);