Explorar o código

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

Source commit: 68178cc97a639220e414d26ec97a4440edfd6f04
Martin Prikryl %!s(int64=7) %!d(string=hai) anos
pai
achega
fea58a5bcd
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  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;