Make sure to update cculture to the last open culture when closing the split view

This commit is contained in:
Kenn Jacobsen
2019-01-14 22:27:01 +01:00
committed by Sebastiaan Janssen
parent 87a3350cd6
commit 651006fbaf

View File

@@ -259,6 +259,8 @@
vm.editors.splice(editorIndex, 1);
//remove variant from open variants
vm.openVariants.splice(editorIndex, 1);
//update cculture to reflect the last open variant (closing the split view corresponds to selecting the other variant)
$location.search("cculture", vm.openVariants[0]);
splitViewChanged();
}, 400);
}
@@ -269,7 +271,7 @@
* @param {any} editorIndex The index of the editor being changed
*/
function selectVariant(variant, editorIndex) {
// prevent variants already open in a split view to be opened
if(vm.openVariants.indexOf(variant.language.culture) !== -1) {
return;