remove is editing checks from toolbar providers since is editing is being checked by layout (#2314)

This commit is contained in:
Deep Tailor 2019-03-17 21:01:03 -07:00 committed by Pegah Sarram
parent 0f2918efaf
commit 350d3c92e7
2 changed files with 3 additions and 3 deletions

View File

@ -28,9 +28,9 @@ define([], function () {
key: "layout",
description: "A toolbar for objects inside a display layout.",
forSelection: function (selection) {
// Apply the layout toolbar if the edit mode is on, and the selected object
// Apply the layout toolbar if the selected object
// is inside a layout, or the main layout is selected.
return (openmct.editor.isEditing() && selection &&
return (selection &&
((selection[1] && selection[1].context.item && selection[1].context.item.type === 'layout') ||
(selection[0].context.item && selection[0].context.item.type === 'layout')));
},

View File

@ -29,7 +29,7 @@ function ToolbarProvider(openmct) {
forSelection: function (selection) {
let context = selection[0].context;
return (openmct.editor.isEditing() && context && context.type &&
return (context && context.type &&
(context.type === 'flexible-layout' || context.type === 'container' || context.type === 'frame'));
},
toolbar: function (selection) {