Merged master

This commit is contained in:
Mo Bitar
2018-07-14 10:11:23 -05:00
3 changed files with 57 additions and 20 deletions

View File

@@ -545,11 +545,17 @@ angular.module('app')
} else if(component.area == "editor-editor") {
// An editor is already active, ensure the potential replacement is explicitely enabled for this item
// We also check if the selectedEditor is active. If it's inactive, we want to treat it as an external reference wishing to deactivate this editor (i.e componentView)
if(this.selectedEditor && this.selectedEditor.active) {
if(component.isExplicitlyEnabledForItem(this.note)) {
this.selectedEditor = component;
if(this.selectedEditor && this.selectedEditor == component && component.active == false) {
this.selectedEditor = null;
}
else if(this.selectedEditor) {
if(this.selectedEditor.active) {
if(component.isExplicitlyEnabledForItem(this.note)) {
this.selectedEditor = component;
}
}
} else {
}
else {
// If no selected editor, let's see if the incoming one is a candidate
if(component.active && this.note && (component.isExplicitlyEnabledForItem(this.note) || component.isDefaultEditor())) {
this.selectedEditor = component;