tmf: Fix for time-alignment bug
[deliverable/tracecompass.git] / tmf / org.eclipse.tracecompass.tmf.ui / src / org / eclipse / tracecompass / tmf / ui / views / histogram / HistogramView.java
index 84922b4c63cae086b5deac855502dcb187e0c74a..f4ad39087e3dd8e95debc6cd10f99ca726a0468e 100644 (file)
@@ -441,8 +441,10 @@ public class HistogramView extends TmfView implements ITmfTimeAligned {
         int plotAreaOffset = fTimeRangeHistogram.getPointAreaOffset();
         int width1 = Math.max(0, offset - plotAreaOffset - fSashForm.getSashWidth());
         int width2 = Math.max(0, total - width1 - fSashForm.getSashWidth());
-        fSashForm.setWeights(new int[] { width1, width2 });
-        fSashForm.layout();
+        if (width1 >= 0 && width2 > 0 || width1 > 0 && width2 >= 0) {
+            fSashForm.setWeights(new int[] { width1, width2 });
+            fSashForm.layout();
+        }
 
         // calculate right margin
         GridLayout layout = (GridLayout) fTimeRangeComposite.getLayout();
This page took 0.026602 seconds and 5 git commands to generate.