From dc1e231ca006437646a03f7fc3f477af491106f2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andr=C3=A9s=20Maneiro?= <amaneiro@icarto.es>
Date: Thu, 8 Mar 2012 18:09:21 +0100
Subject: [PATCH 1/2] gvsig-desktop fixes #416

Don't print layer is it is not visible ot has scale restrictions. See the history for this bug through these changesets:

    * r24271 : more work on this area
    * r24160 : introduce the regression as the checks are deleted from FLayers but not move down to FLyVect
    * r12657 : the checks are move up to FLayers
---
 .../com/iver/cit/gvsig/fmap/layers/FLyrVect.java   |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/libraries/libFMap/src/com/iver/cit/gvsig/fmap/layers/FLyrVect.java b/libraries/libFMap/src/com/iver/cit/gvsig/fmap/layers/FLyrVect.java
index c74d9e9..b533097 100644
--- a/libraries/libFMap/src/com/iver/cit/gvsig/fmap/layers/FLyrVect.java
+++ b/libraries/libFMap/src/com/iver/cit/gvsig/fmap/layers/FLyrVect.java
@@ -947,7 +947,9 @@ public class FLyrVect extends FLyrDefault implements ILabelable,
     public void print(Graphics2D g, ViewPort viewPort, Cancellable cancel,
             double scale, PrintRequestAttributeSet properties) throws ReadDriverException {
 //    	if (forTestOnlyVariableUseIterators_REMOVE_THIS_FIELD) {
+    	if (isVisible() && isWithinScale(scale)) {
     		_print(g, viewPort, cancel, scale, properties);
+    	}
 //    	} else {
 ////    		moved up to Flayers
 ////    		if (isVisible() && isWithinScale(scale)) {
-- 
1.7.1

