Prechádzať zdrojové kódy

c4ee38c79 by mistake disabled saving of local files opened in an internal editor

Source commit: 68178cc97a639220e414d26ec97a4440edfd6f04
Martin Prikryl 7 rokov pred
rodič
commit
fea58a5bcd
1 zmenil súbory, kde vykonal 3 pridanie a 1 odobranie
  1. 3 1
      source/forms/Editor.cpp

+ 3 - 1
source/forms/Editor.cpp

@@ -1012,7 +1012,9 @@ void __fastcall TEditorForm::FileUploadComplete()
 //---------------------------------------------------------------------------
 void __fastcall TEditorForm::UpdateControls()
 {
-  EditorMemo->ReadOnly = (OnFileChanged == NULL);
+  // To disable saving, e.g. in encryption mode (no queue support) - both OnFileChanged and OnSaveAll are NULL.
+  // But internal editors have (OnFileChanged == NULL), but OnSaveAll set, so we use OnSaveAll for dicision
+  EditorMemo->ReadOnly = (OnSaveAll == NULL);
 
   TPoint ACaretPos = EditorMemo->CaretPos;