diff --git a/cave/com.raytheon.uf.viz.d2d.ui/plugin.xml b/cave/com.raytheon.uf.viz.d2d.ui/plugin.xml
index b2bf7b9127..71fd046f17 100644
--- a/cave/com.raytheon.uf.viz.d2d.ui/plugin.xml
+++ b/cave/com.raytheon.uf.viz.d2d.ui/plugin.xml
@@ -251,7 +251,7 @@
label="1 Pane Layout">
+ value="0">
*
* @author mschenke
@@ -164,10 +165,15 @@ public class ChangeD2DLayoutAction extends AbstractHandler {
*/
private void sizeWidth(MElementContainer sideViewsContainer,
int nSideViews) {
+ int width;
if (nSideViews > 5) {
nSideViews = 5;
}
- int width = (6 - nSideViews) * 1000;
+ if (nSideViews == 0) {
+ width = 0;
+ } else {
+ width = (6 - nSideViews) * 1000;
+ }
int diff = 10000 - width;
MElementContainer screenContainer = sideViewsContainer
.getParent();
diff --git a/cave/com.raytheon.uf.viz.d2d.ui/src/com/raytheon/uf/viz/d2d/ui/perspectives/D2D5Pane.java b/cave/com.raytheon.uf.viz.d2d.ui/src/com/raytheon/uf/viz/d2d/ui/perspectives/D2D5Pane.java
index ec089f16a9..4824e11a81 100644
--- a/cave/com.raytheon.uf.viz.d2d.ui/src/com/raytheon/uf/viz/d2d/ui/perspectives/D2D5Pane.java
+++ b/cave/com.raytheon.uf.viz.d2d.ui/src/com/raytheon/uf/viz/d2d/ui/perspectives/D2D5Pane.java
@@ -51,7 +51,8 @@ import com.raytheon.viz.ui.UiUtil;
* 7/1/06 chammack Initial Creation.
* Mar 21, 2013 1638 mschenke Changed map scales not tied to d2d
* Oct 10, 2013 2104 mschenke Switched to use MapScalesManager
- *
+ * Aug 24, 2022 srcarter Default to single pane view
+ *
*
*
* @author chammack
@@ -93,30 +94,32 @@ public class D2D5Pane implements IPerspectiveFactory {
}
}
- int numViews = ChangeD2DLayoutAction.getViewCount() == 2 ? 2
- : baseViewsToAdd.size();
+ int numViews = 0;
String lastAdded = null;
Collections.sort(baseViewsToAdd);
- for (int i = 0; i < baseViewsToAdd.size(); ++i) {
- String baseView = baseViewsToAdd.get(i);
- if (baseViewsToAdd.contains(baseView)) {
- if (lastAdded == null) {
- layout.addStandaloneView(
- baseView,
- false,
- IPageLayout.LEFT,
- ChangeD2DLayoutAction.getViewCount() == 2 ? THREE_PANE_WIDTH
- : FIVE_PANE_WIDTH, editorArea);
- } else {
- layout.addStandaloneView(baseView, false,
- IPageLayout.BOTTOM, (i >= numViews) ? 1.0f
- : 1.0f / (numViews - i + 1), lastAdded);
+ if (numViews > 0) {
+ for (int i = 0; i < baseViewsToAdd.size(); ++i) {
+ String baseView = baseViewsToAdd.get(i);
+ if (baseViewsToAdd.contains(baseView)) {
+ if (lastAdded == null) {
+ layout.addStandaloneView(baseView, false,
+ IPageLayout.LEFT,
+ ChangeD2DLayoutAction.getViewCount() == 2
+ ? THREE_PANE_WIDTH
+ : FIVE_PANE_WIDTH,
+ editorArea);
+ } else {
+ layout.addStandaloneView(baseView, false,
+ IPageLayout.BOTTOM, (i >= numViews) ? 1.0f
+ : 1.0f / (numViews - i + 1),
+ lastAdded);
+ }
+ lastAdded = baseView;
+ addedViews.add(lastAdded);
}
- lastAdded = baseView;
- addedViews.add(lastAdded);
}
}