]> source.dussan.org Git - sonarqube.git/commitdiff
Violations viewer : do not display the empty period filter
authorsimonbrandhof <simon.brandhof@gmail.com>
Mon, 3 Jan 2011 15:44:23 +0000 (15:44 +0000)
committersimonbrandhof <simon.brandhof@gmail.com>
Mon, 3 Jan 2011 15:44:23 +0000 (15:44 +0000)
plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/violationsviewer/client/ViolationsViewer.java

index 08659d046613163f71d8a547547268c987f79ae2..137ad9f37ebf9929db09fe17d069eac6b3daeed9 100644 (file)
@@ -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");