From bdb18ea85b1bd3ab31dfbf7f81857c06d0b4f43d Mon Sep 17 00:00:00 2001 From: Lee Venable Date: Fri, 28 Mar 2014 15:30:11 -0500 Subject: [PATCH] Issue #2960 - added checks for SashForm weights Former-commit-id: 3018ff1f5f9b276ae7c099282f1ec9ca17dc3470 [formerly 1a3c0743b773f695fa881f83a9773a899a2ef111] Former-commit-id: 19dd95ba247a2654b61fb073133b36d484343823 --- .../uf/viz/collaboration/ui/session/SessionView.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/cave/com.raytheon.uf.viz.collaboration.ui/src/com/raytheon/uf/viz/collaboration/ui/session/SessionView.java b/cave/com.raytheon.uf.viz.collaboration.ui/src/com/raytheon/uf/viz/collaboration/ui/session/SessionView.java index 4d14c05451..dbbba457e1 100644 --- a/cave/com.raytheon.uf.viz.collaboration.ui/src/com/raytheon/uf/viz/collaboration/ui/session/SessionView.java +++ b/cave/com.raytheon.uf.viz.collaboration.ui/src/com/raytheon/uf/viz/collaboration/ui/session/SessionView.java @@ -109,6 +109,8 @@ import com.raytheon.viz.ui.views.CaveWorkbenchPageManager; * Mar 06, 2014 2751 bclement moved users table refresh logic to refreshParticipantList() * Mar 06, 2014 2848 bclement get venueName directly from session * Mar 11, 2014 #2865 lvenable Added null checks in threads + * Mar 28, 2014 #2960 lvenable Added check to make sure the SashForm is not getting + * negative weights - set to zero if negative. * * * @@ -331,6 +333,15 @@ public class SessionView extends AbstractSessionView participantsLabel .setToolTipText("Select to hide participants..."); } + + // If the weight value is negative then make it zero since it + // cannot have a negative number. + for (int i = 0; i < weights.length; i++) { + if (weights[i] < 0) { + weights[i] = 0; + } + } + ((SashForm) parent).setWeights(weights); parent.layout(); }