From: rkv Date: Fri, 29 Nov 2013 07:16:34 +0000 (+0000) Subject: Vasily has fixed the following bug : X-Git-Tag: V7_3_0b1~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=8c442e91ec52d08649a5c85f485c5ce82197cb0c;p=tools%2Fsiman.git Vasily has fixed the following bug : (Steps to reproduce) - Import the e0_donnees.py - Import the e1_geometrie.py (uses e0_donnees.py) - Remove the e1_geometrie.py - Remove the e0_donnees.py - Import the e0_donnees.py - Import the e1_geometrie.py (uses e0_donnees.py) - Try to version the e0_donnees.py ==> There is no Information message like "Warning: The documents below will ...." Only after moving to each other activity and returning back to the Geometry one this information message appears during versioning of the e0_donnees.py --- diff --git a/Workspace/Siman/src/org/splat/simer/OpenStudy.java b/Workspace/Siman/src/org/splat/simer/OpenStudy.java index 1f97444..fc76dfd 100644 --- a/Workspace/Siman/src/org/splat/simer/OpenStudy.java +++ b/Workspace/Siman/src/org/splat/simer/OpenStudy.java @@ -139,8 +139,8 @@ public class OpenStudy extends AbstractOpenObject implements OpenStudyServices { _context = new ArrayList(); if (_selection.equals("0.1")) { _ustep = getProjectElementService().getFirstStep(_mystudy); - } - _ustep.setActor(_cuser); + } + _ustep.setActor(_cuser); if ((_involving.isEmpty()) || (_involving.get(0).getOwnerStudy().getIndex() != _ustep.getOwnerStudy().getIndex())) { _involving.clear(); @@ -847,4 +847,13 @@ public class OpenStudy extends AbstractOpenObject implements OpenStudyServices { public void setMystudy(final Study mystudy) { this._mystudy = mystudy; } + + /** + * Update the current step. + * + */ + public final void updateCurrentStep() { + setupPreviousToSelectedSteps(); + _ustep = _involving.get(_involving.size() - 1); + } } \ No newline at end of file diff --git a/Workspace/Siman/src/org/splat/simer/VersionDocumentAction.java b/Workspace/Siman/src/org/splat/simer/VersionDocumentAction.java index f533f66..9073364 100644 --- a/Workspace/Siman/src/org/splat/simer/VersionDocumentAction.java +++ b/Workspace/Siman/src/org/splat/simer/VersionDocumentAction.java @@ -65,8 +65,9 @@ public class VersionDocumentAction extends BaseUploadDocumentAction { File upfile = commonInitialize(Constants.TRUE); _mystudy = getOpenStudy(); + _mystudy.updateCurrentStep(); _defuses = new ArrayList(); - + Publication tag = _mystudy.getSelectedStep().getDocument( Integer.valueOf(_index)); Document doc = tag.value();