Revision 3010 trunk/libraries/libCorePlugin/src/com/iver/core/mdiManager/ViewStackSupport.java

View differences:

ViewStackSupport.java
101 101
	
102 102
	public View getActiveView(){
103 103
		if (vistas.size() == 0) return null;
104
        
105
        View aux = (View) vistas.get(vistas.size() - 1);
106
        System.err.println("getActiveView = " + aux.getViewInfo().getTitle());
107
		return aux;
104
        int index = vistas.size()-1;
105
        while (index >= 0)
106
        {
107
            View aux = (View) vistas.get(index);
108
            if (!aux.getViewInfo().isPalette())
109
            {
110
                System.err.println("getActiveView = " + aux.getViewInfo().getTitle());
111
                return aux;
112
            }
113
            index--;
114
        }
115
        return null;
108 116
	}
109 117
    /**
110 118
     * Se utiliza cuando ya est? abierta la vista para indicar
......
118 126
    {
119 127
        View copia = null;
120 128
        boolean bCopiar = false;
129
        // Si es de tipo palette, no se pone como activa.
130
        // De esta forma, nunca nos la devolver?.... Bueno, 
131
        // igual si cerramos la de encima. Voy a ponerle en
132
        // getActiveView que si es de tipo Palette, devuelva la
133
        // de abajo.
134
        if (v.getViewInfo().isPalette()) return;
135
        
121 136
        for (int i=0; i < vistas.size(); i++)
122 137
        {
123 138
            View aux = (View) vistas.get(i);

Also available in: Unified diff