Revision 33 trunk/org.gvsig.app.document.layout.app/org.gvsig.app.document.layout.app.mainplugin/src/main/java/org/gvsig/app/extension/LayoutMainExtension.java

View differences:

LayoutMainExtension.java
149 149
        JFileChooser jfc =
150 150
            new JFileChooser(LAYOUT_TEMPLATE_FILECHOOSER_ID, templatesPath);
151 151
        jfc.addChoosableFileFilter(new GenericFileFilter(
152
            LayoutManager.TEMPLATE_FILE_EXTENSION, PluginServices.getText(this,
152
            LayoutManager.TEMPLATE_FILE_POINTEXT, PluginServices.getText(this,
153 153
                "_Layout_template")));
154 154

  
155 155
        if (jfc.showOpenDialog((Component) PluginServices.getMainFrame()) == JFileChooser.APPROVE_OPTION) {
156 156
            File file = jfc.getSelectedFile();
157 157
            if (!file.getPath().toLowerCase()
158
                .endsWith(LayoutManager.TEMPLATE_FILE_EXTENSION.toLowerCase())) {
158
                .endsWith(LayoutManager.TEMPLATE_FILE_POINTEXT.toLowerCase())) {
159 159
                file =
160 160
                    new File(file.getPath()
161
                        + LayoutManager.TEMPLATE_FILE_EXTENSION);
161
                        + LayoutManager.TEMPLATE_FILE_POINTEXT);
162 162
            }
163 163
            try {
164 164
                File xmlFile = new File(file.getAbsolutePath());
......
188 188
                ApplicationLocator.getManager().getProjectManager()
189 189
                    .getCurrentProject();
190 190
            p.add(layoutDocument);
191
            
192
            layout.getLayoutControl().setTool("layoutselect");
191 193
            PluginServices.getMDIManager().addWindow(layout);
192 194

  
193 195
        }

Also available in: Unified diff