Revision 45679

View differences:

trunk/org.gvsig.desktop/org.gvsig.desktop.framework/org.gvsig.andami/src/main/java/org/gvsig/andami/ui/wizard/UnsavedDataPanel.java
224 224
			botSave = new JButton();
225 225
			botSave.setName("botSave");
226 226
			botSave.setToolTipText(PluginServices.getText(this, "save_selected_resources_and_exit"));
227
			botSave.setText(PluginServices.getText(this, "ok"));
227
			botSave.setText(PluginServices.getText(this, "save"));
228 228
			botSave.setActionCommand("Accept");
229 229
			botSave.addActionListener(this);
230 230
		}
trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin/src/main/java/org/gvsig/app/extension/ViewControls.java
183 183

  
184 184
        } else if (command.equalsIgnoreCase("view-change-scale")) {
185 185
            try {
186
                Long scale = (Long) ToolsLocator.getDataTypesManager().coerce(DataTypes.LONG, args[0]);
187
                mapa.setScaleView(scale.longValue());
188
                document.setModified(true);
186
                Long newscale = (Long) ToolsLocator.getDataTypesManager().coerce(DataTypes.LONG, args[0]);
187
                long prevscale = mapa.getScaleView();
188
                mapa.setScaleView(newscale);
189
                if(prevscale != newscale) {
190
                    document.setModified(true);
191
                }
189 192
            } catch (Throwable ex) {
190 193
                logger.info("Can't change scale of view.", ex);
191 194
                application.message("Can't change scale of view.", JOptionPane.ERROR_MESSAGE);
trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin/src/main/java/org/gvsig/app/extension/InitializeApplicationExtension.java
51 51
import org.gvsig.app.ApplicationLocator;
52 52
import org.gvsig.app.ApplicationManager;
53 53
import static org.gvsig.app.extension.ProjectExtension.PROJECT_FILE_CHOOSER_ID;
54
import org.gvsig.app.project.Project;
54 55
import org.gvsig.app.project.ProjectManager;
55 56
import org.gvsig.app.project.ProjectPreferences;
56 57
import org.gvsig.app.project.documents.view.ViewDocument;
......
305 306
        public void run() {
306 307
            ApplicationManager application = ApplicationLocator.getManager();
307 308
            ProjectManager projectManager = application.getProjectManager();
309
            Project project = projectManager.getCurrentProject();
308 310

  
309 311
            ViewManager viewManager = (ViewManager) projectManager.getDocumentManager(ViewManager.TYPENAME);
310 312
            ViewDocument view = (ViewDocument) viewManager.createDocument();
311
            projectManager.getCurrentProject().add(view);
313
            project.addDocument(view);
312 314

  
313 315
            IView viewWindow = (IView) viewManager.getMainWindow(view);
314 316

  
......
318 320
            } catch (PropertyVetoException e) {
319 321
                LOGGER.info("Can't maximize view.", e);
320 322
            }
323
            project.setModified(false);
321 324
        }
322 325

  
323 326
    }
trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin/src/main/java/org/gvsig/app/extension/ProjectExtension.java
715 715
        @Override
716 716
        public String getResourceName() {
717 717
            if (getPath() == null) {
718
                return PluginServices.getText(ProjectExtension.this, "Unnamed");
718
                return PluginServices.getText(ProjectExtension.this, "_Project_not_saved");
719 719
            } else {
720 720
                return getPath();
721 721
            }
trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin/src/main/java/org/gvsig/app/project/DefaultProject.java
371 371

  
372 372
    @Override
373 373
    public boolean hasChanged() {
374
		// we return true if the project is not empty (until we have a better
375
        // method...)
376
        if ((this.getDocuments().size() != 0) || modified) {
374
        if( modified ) {
377 375
            return true;
378 376
        }
377
        if (this.getDocuments().isEmpty() ) {
378
            return false;
379
        }
380
        for (Document document : this.getDocuments()) {
381
            if( document.isTemporary()) {
382
                continue;
383
            }
384
            if( document.isModified() ) {
385
                return true;
386
            }
387
        }
379 388
        return false;
380 389
    }
381 390

  
trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin/src/main/resources-plugin/i18n/text.properties
1536 1536
Filter=Filtrar
1537 1537
_Filter_by_attributes=Filtrar por atributos
1538 1538
_Field_to_group_by_unique_values=Campo a agrupar por valores \u00fanicos
1539
_Aggregate_operations=Operaciones de agregado
1539
_Aggregate_operations=Operaciones de agregado
1540
_Project_not_saved=Proyecto no guardado
trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin/src/main/resources-plugin/i18n/text_en.properties
1454 1454
Filter=Filter
1455 1455
_Filter_by_attributes=Filter by attributes
1456 1456
_Field_to_group_by_unique_values=Field to group by unique values
1457
_Aggregate_operations=Aggregate operations
1457
_Aggregate_operations=Aggregate operations
1458
_Project_not_saved=Project not saved

Also available in: Unified diff