Przeglądaj źródła

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

Source commit: 68178cc97a639220e414d26ec97a4440edfd6f04
Martin Prikryl 7 lat temu
rodzic
commit
fea58a5bcd
1 zmienionych plików z 3 dodań i 1 usunięć
  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;