mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-27 15:41:26 +00:00
Merge pull request #4131 from overleaf/ae-uneditable-file-outline
Notify the outline manager when a file is opened GitOrigin-RevId: 246da98f1b9a433aeeb8e5b420ad0999544778c3
This commit is contained in:
parent
29b92615ce
commit
3ab0aee30c
2 changed files with 10 additions and 1 deletions
|
@ -42,6 +42,12 @@ class OutlineManager {
|
|||
this.broadcastChangeEvent()
|
||||
})
|
||||
|
||||
scope.$on('file-view:file-opened', () => {
|
||||
this.isTexFile = false
|
||||
this.updateOutline()
|
||||
this.broadcastChangeEvent()
|
||||
})
|
||||
|
||||
scope.$on('cursor:editor:update', (event, cursorPosition) => {
|
||||
if (this.ignoreNextCursorUpdate) {
|
||||
this.ignoreNextCursorUpdate = false
|
||||
|
|
|
@ -31,7 +31,10 @@ export default BinaryFilesManager = class BinaryFilesManager {
|
|||
return window.setTimeout(
|
||||
() => {
|
||||
this.$scope.openFile = file
|
||||
return this.$scope.$apply()
|
||||
|
||||
this.$scope.$apply()
|
||||
|
||||
this.$scope.$broadcast('file-view:file-opened')
|
||||
},
|
||||
0,
|
||||
this
|
||||
|
|
Loading…
Reference in a new issue