Revision 46033 trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin/src/main/java/org/gvsig/app/project/documents/gui/projectpanel/ProjectDocumentsPanelPage.java
ProjectDocumentsPanelPage.java | ||
---|---|---|
425 | 425 |
JOptionPane.QUESTION_MESSAGE, |
426 | 426 |
doc.getName() |
427 | 427 |
); |
428 |
for (Document document : documents) { |
|
429 |
if (StringUtils.equals(document.getName(), name)) { |
|
430 |
application.messageDialog( |
|
431 |
i18n.getTranslation("elemento_ya_existe"), |
|
432 |
i18n.getTranslation("warning"), |
|
433 |
JOptionPane.WARNING_MESSAGE |
|
434 |
); |
|
435 |
return; |
|
428 |
if(name != null) { |
|
429 |
for (Document document : documents) { |
|
430 |
if (StringUtils.equals(document.getName(), name)) { |
|
431 |
application.messageDialog( |
|
432 |
i18n.getTranslation("elemento_ya_existe"), |
|
433 |
i18n.getTranslation("warning"), |
|
434 |
JOptionPane.WARNING_MESSAGE |
|
435 |
); |
|
436 |
return; |
|
437 |
} |
|
436 | 438 |
} |
439 |
doc.setName(name); |
|
440 |
updateProjectDocumens(); |
|
441 |
this.project.setModified(true); |
|
437 | 442 |
} |
438 |
doc.setName(name); |
|
439 |
updateProjectDocumens(); |
|
440 |
this.project.setModified(true); |
|
441 | 443 |
} |
442 | 444 |
|
443 | 445 |
private void doDocumentDelete() { |
Also available in: Unified diff