diff flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/FixingsOverview.java @ 5804:948d07aa988a

FixA: Fixes flys/issue1138 (Ausgel. WSPL: Streckenintelligenz bei Generierung Balkendiagramm)
author Sascha L. Teichmann <teichmann@intevation.de>
date Wed, 24 Apr 2013 11:14:29 +0200
parents 0cab1c884e72
children
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/FixingsOverview.java	Wed Apr 24 09:10:48 2013 +0200
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/FixingsOverview.java	Wed Apr 24 11:14:29 2013 +0200
@@ -194,6 +194,15 @@
                 return sectors;
             }
 
+            public boolean hasSectorsInRange(Range range) {
+                for (SectorRange sector: sectors) {
+                    if (sector.intersects(range)) {
+                        return true;
+                    }
+                }
+                return false;
+            }
+
             public List<SectorRange> getSectors(Range range) {
 
                 List<SectorRange> result =
@@ -340,7 +349,7 @@
             Filter       filter
         ) {
             for (Column column: columns) {
-                if ((range == null || column.intersects(range))
+                if ((range == null || column.hasSectorsInRange(range))
                 && (filter == null || filter.accept(column))) {
                     allColumns.add(column);
                 }

http://dive4elements.wald.intevation.org