From a6e39adc0865d35f405adb3cd709c1d4b7f7fdf7 Mon Sep 17 00:00:00 2001 From: simonbrandhof Date: Mon, 3 Jan 2011 15:44:23 +0000 Subject: [PATCH] Violations viewer : do not display the empty period filter --- .../core/violationsviewer/client/ViolationsViewer.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/violationsviewer/client/ViolationsViewer.java b/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/violationsviewer/client/ViolationsViewer.java index 08659d04661..137ad9f37eb 100644 --- a/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/violationsviewer/client/ViolationsViewer.java +++ b/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/violationsviewer/client/ViolationsViewer.java @@ -75,8 +75,10 @@ public class ViolationsViewer extends Page { initFilters(); - header.setWidget(0, 1, periodBox); - header.getCellFormatter().setStyleName(0, 1, "thin cell right"); + if (periodBox.getItemCount() > 1) { + header.setWidget(0, 1, periodBox); + header.getCellFormatter().setStyleName(0, 1, "thin cell right"); + } header.setWidget(0, 2, filterBox); header.getCellFormatter().setStyleName(0, 2, "thin cell right"); -- 2.39.5