Skip to content

Commit 87f8eda

Browse files
ChsudeeptaChsudeepta
authored andcommitted
Minor changes
1 parent 4e3f053 commit 87f8eda

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

base/uk.ac.stfc.isis.ibex.ui.configserver/src/uk/ac/stfc/isis/ibex/ui/configserver/editing/ConfigEditorPanel.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ public class ConfigEditorPanel extends Composite {
5151
private TabItem blocksTab;
5252

5353
private TabFolder editorTabs;
54-
private final GlobalMacroOverviewPanel globalMacros;
5554

5655
/**
5756
* The constructor for the overall panel that is used for editing and
@@ -125,10 +124,12 @@ public void widgetSelected(SelectionEvent e) {
125124

126125
setConfigToEdit(config);
127126

128-
globalMacros = new GlobalMacroOverviewPanel(editorTabs, SWT.NONE, config);
129-
TabItem globalMacrosTab = new TabItem(editorTabs, SWT.NONE);
130-
globalMacrosTab.setText("Global Macros");
131-
globalMacrosTab.setControl(globalMacros);
127+
if (!config.getGlobalmacros().isEmpty()) {
128+
final GlobalMacroOverviewPanel globalMacros = new GlobalMacroOverviewPanel(editorTabs, SWT.NONE, config);
129+
TabItem globalMacrosTab = new TabItem(editorTabs, SWT.NONE);
130+
globalMacrosTab.setText("Global Macros");
131+
globalMacrosTab.setControl(globalMacros);
132+
}
132133
}
133134

134135
/**

base/uk.ac.stfc.isis.ibex.ui.configserver/src/uk/ac/stfc/isis/ibex/ui/configserver/editing/macros/GlobalMacroOverviewPanel.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,5 +71,4 @@ public void setMacros(final List<GlobalMacro> globalmacros) {
7171
entry -> new GlobalMacroViewModel(macro.getName(), entry.getKey(), entry.getValue())))
7272
.collect(Collectors.toList());
7373
}
74-
7574
}

0 commit comments

Comments
 (0)