diff --git a/src/components/codeEditors/aceEditors/simpleAceEditor.tsx b/src/components/codeEditors/aceEditors/simpleAceEditor.tsx index d4ae625ce66201b5b6067dc2898763f92afeeaad..191d2eac29d381dbdb3aad70239e0f01d5dc7fb5 100644 --- a/src/components/codeEditors/aceEditors/simpleAceEditor.tsx +++ b/src/components/codeEditors/aceEditors/simpleAceEditor.tsx @@ -208,7 +208,11 @@ class SimpleAceEditor extends React.Component<Props, any> { return } + //the session could have changed e.g. when we load the edit exercise site + //we first display the initial content (session) + //after we loaded the exercise data we create a new session where the settings are not applied yet... this.aceEditorWrapper.editor.setSession(wrapperTab.session) + this.applyEditorSettingsToTabs() } } diff --git a/src/constants.ts b/src/constants.ts index a7b4dc1b5a213bfaea9070b6805fb3684a0c44de..cfcd9b0ee713fbda607789ab1fcf279d2d62518d 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -13,7 +13,7 @@ import Logger from './helpers/logger' * y - breaking changes / new features * z - fixes, small changes */ -export const versionString = '2.5.3' +export const versionString = '2.5.4' export const supportMail = 'yapex@informatik.uni-halle.de' diff --git a/src/state/reducers/editorSettingsDialog/editorSettingsReducer.ts b/src/state/reducers/editorSettingsDialog/editorSettingsReducer.ts index a75414ac3d6f1421cff5c7d877cbf0de661e107a..086d8b5adb933f6126058e65917fdde98768cc0c 100644 --- a/src/state/reducers/editorSettingsDialog/editorSettingsReducer.ts +++ b/src/state/reducers/editorSettingsDialog/editorSettingsReducer.ts @@ -13,7 +13,7 @@ export type State = CodeEditorSettingsFullBase export const initial: State = { id: -1, theme: defaultEditorTheme, - fontSize: 12, + fontSize: 13, highlightCurrentLine: true, showInvisibles: false, showLineNumbers: true, diff --git a/src/state/reducers/exerciseEditorSite/getEditorExerciseReducer.ts b/src/state/reducers/exerciseEditorSite/getEditorExerciseReducer.ts index a780215bbc62852bc9b16e6ef99a5d5120fb106b..a2e9c9c8005faffd6f209a748bc29276a7a1d620 100644 --- a/src/state/reducers/exerciseEditorSite/getEditorExerciseReducer.ts +++ b/src/state/reducers/exerciseEditorSite/getEditorExerciseReducer.ts @@ -59,6 +59,7 @@ export function reducer(state: State = initial(), action: AllActions): State { AceEditorsStorageHelper.removeEditor(editExerciseExerciseDescriptionEditorPanelViewEditorId) //these ares the same defaults as in the descriptionEditorPanelView (we need the same id) + //here the editor settings are not yet applied but we apply them in the componentDidUpdate method of the editor wrapper AceEditorsStorageHelper.addEditor(editExerciseExerciseDescriptionEditorPanelViewEditorId, { id: 0, content: action.payload.exerciseDescription.content,