]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Additional fix for delete boolean parameter in method: "updateObjBrowser"
authorimn <imn@opencascade.com>
Mon, 14 Nov 2016 11:15:25 +0000 (14:15 +0300)
committerimn <imn@opencascade.com>
Mon, 14 Nov 2016 11:15:25 +0000 (14:15 +0300)
src/KERNEL_PY/Help.py
src/KERNEL_PY/__init__.py
src/KERNEL_PY/batchmode_salome.py
src/KERNEL_PY/salome_iapp.py
src/KERNEL_PY/salome_study.py
src/KERNEL_PY/salome_test.py
src/SALOMEDSClient/SALOMEDSClient_ClientFactory.cxx
src/SALOMEDSImpl/SALOMEDSImpl_Study.cxx

index d349d3f2fccf3af4c95f861c2ecf36b915a4d7e9..7cebb8f6568417668dc4061cf13e59728ab73e01 100755 (executable)
@@ -52,7 +52,7 @@ variables:
                            with a Server name and an Engine name
   salome.sg
       methods:
-         updateObjBrowser(bool):
+         updateObjBrowser():
          getStudyName():
          
          SelectedCount():      returns number of selected objects
index 5d0cb75e7ac8613797f314273638261f200e6f21..31adec9dd9484877f43c0e6fd0e454e5217c53fc 100755 (executable)
@@ -45,7 +45,7 @@ variables:
 
   - salome.sg              : salome object to communicate with the graphical user interface (if any)
       - methods:
-         - updateObjBrowser(bool):
+         - updateObjBrowser():
 
          - SelectedCount():      returns number of selected objects
          - getSelected(i):       returns entry of selected object number i
index 9e036ec88755b6ff484e5b2a4709cd05c0e49eb7..8d60ebadff184cd381bdcd883b9282eab4adf11d 100755 (executable)
@@ -105,7 +105,7 @@ def IDToSObject(id):
 
     #--------------------------------------------------------------------------
 
-def PersistentPresentation(theStudy, theSO, theWithID):
+def PersistentPresentation(theSO, theWithID):
     # put the sobject's content (with subchildren) to the string
     aResult = ""
     attrs = theSO.GetAllAttributes()
@@ -154,9 +154,9 @@ def PersistentPresentation(theStudy, theSO, theWithID):
         aResult = "sobject: " + theSO.GetID() + " nbattrs: " + str(aLen - anUncopied) + aResult + '\n'
     else:
         aResult = " nbattrs: " + str(aLen - anUncopied) + aResult + '\n'
-    anIter = theStudy.NewChildIterator(theSO)
+    anIter = myStudy.NewChildIterator(theSO)
     while anIter.More():
-        aResult += PersistentPresentation(theStudy, anIter.Value(), theWithID)
+        aResult += PersistentPresentation(anIter.Value(), theWithID)
         anIter.Next()
     return aResult
 
@@ -178,7 +178,7 @@ def CheckCopyPaste(theSO, theInfo ,theComponentPaste):
     while aRoot.GetID() != "0:":
         aRoot = aRoot.GetFather()
     aTree = GetTree(aRoot)
-    aStudyPersist = PersistentPresentation(myStudy, aRoot, 1)
+    aStudyPersist = PersistentPresentation(aRoot, 1)
 
     if not myStudy.CanCopy(theSO):
         raise RuntimeError, "<CanCopy> for "+theInfo+" returns false"
@@ -191,7 +191,7 @@ def CheckCopyPaste(theSO, theInfo ,theComponentPaste):
         raise RuntimeError, "<CanPaste> for "+theInfo+" returns false"
 
     # check: before paste study is not changed check
-    if aStudyPersist != PersistentPresentation(myStudy, aRoot, 1):
+    if aStudyPersist != PersistentPresentation(aRoot, 1):
         raise RuntimeError, "Study is changed before Paste calling for "+theInfo
     
     aSObj = theSO
index ac3c674efe0f3ca648f97f2dd91f70ded6771c88..cdd942bd1bd35a37b89d18621598f847a3054bf8 100755 (executable)
@@ -77,7 +77,7 @@ class SalomeOutsideGUI(object):
         """Indicate if GUI is running"""
         return False
     
-    def updateObjBrowser(self, bid):
+    def updateObjBrowser(self):
         """update the GUI object browser"""
         print "SalomeOutsideGUI: no objectBrowser update outside GUI"
         pass
index 7269f8b1c694fe9d21dee9313b2764aa1b55efd0..fc432a30c783ecebda036bacf661c1e59126d48a 100755 (executable)
@@ -114,7 +114,7 @@ def generateName(prefix = None):
 
     #--------------------------------------------------------------------------
 
-def PersistentPresentation(theStudy, theSO, theWithID):
+def PersistentPresentation(theSO, theWithID):
     # put the sobject's content (with subchildren) to the string
     aResult = ""
     attrs = theSO.GetAllAttributes()
@@ -163,9 +163,9 @@ def PersistentPresentation(theStudy, theSO, theWithID):
         aResult = "sobject: " + theSO.GetID() + " nbattrs: " + str(aLen - anUncopied) + aResult + '\n'
     else:
         aResult = " nbattrs: " + str(aLen - anUncopied) + aResult + '\n'
-    anIter = theStudy.NewChildIterator(theSO)
+    anIter = myStudy.NewChildIterator(theSO)
     while anIter.More():
-        aResult += PersistentPresentation(theStudy, anIter.Value(), theWithID)
+        aResult += PersistentPresentation(anIter.Value(), theWithID)
         anIter.Next()
     return aResult
 
@@ -190,7 +190,7 @@ def CheckCopyPaste(theSO, theInfo ,theComponentPaste):
     while aRoot.GetID() != "0:":
         aRoot = aRoot.GetFather()
     aTree = GetTree(aRoot)
-    aStudyPersist = PersistentPresentation(myStudy, aRoot, 1)
+    aStudyPersist = PersistentPresentation(aRoot, 1)
 
     if not myStudy.CanCopy(theSO):
         raise RuntimeError, "<CanCopy> for "+theInfo+" returns false"
@@ -203,7 +203,7 @@ def CheckCopyPaste(theSO, theInfo ,theComponentPaste):
         raise RuntimeError, "<CanPaste> for "+theInfo+" returns false"
 
     # check: before paste study is not changed check
-    if aStudyPersist != PersistentPresentation(myStudy, aRoot, 1):
+    if aStudyPersist != PersistentPresentation(aRoot, 1):
         raise RuntimeError, "Study is changed before Paste calling for "+theInfo
     
     aSObj = theSO
@@ -266,24 +266,6 @@ def FindFileInDataDir(filename):
 
     #--------------------------------------------------------------------------
 
-def setCurrentStudy(theStudy):
-    """
-    Change current study : an existing one given by a study object.
-
-    :param theStudy: the study CORBA object to set as current study
-
-    Obsolete: only one study can be opened at the moment.
-    This function works properly if specified theStudy parameter
-    corresponds to the currently opened study.
-    Kept for backward compatibility only.
-    """
-    global myStudy, myStudyName
-    myStudy = theStudy
-    myStudyName = theStudy._get_Name()
-    return myStudy, myStudyName
-
-    #--------------------------------------------------------------------------
-
 def openStudy(theStudyPath):
     global myStudy
     print "openStudy"
index 9d51d2f54debcd88e086baf9379f381f2b62f7ed..8902e461dcf06a82e68a13a728f31a5f55e2a702 100755 (executable)
@@ -163,7 +163,7 @@ print "OK"
 
 # ---- update object browser
 if salome.hasDesktop():
-    salome.sg.updateObjBrowser(True);
+    salome.sg.updateObjBrowser();
 
 print
 
@@ -303,7 +303,7 @@ print "OK"
 
 # ---- update object browser
 if salome.hasDesktop():
-    salome.sg.updateObjBrowser(True);
+    salome.sg.updateObjBrowser();
 
 print
 
@@ -455,4 +455,4 @@ else: # not in gui mode, Paravis can not be tested
 
 # ---- update object browser
 if salome.hasDesktop():
-    salome.sg.updateObjBrowser(True);
+    salome.sg.updateObjBrowser();
index b75cf08438068efa93a5bb0c80f6bfb61462e94a..77d1861b754aa8c0f54aff494bbf3d8005f4a7a8 100644 (file)
@@ -113,7 +113,6 @@ _PTR(Study) ClientFactory::Study(SALOMEDS::Study_ptr theStudy)
 
 void ClientFactory::createStudy(CORBA::ORB_ptr orb, PortableServer::POA_ptr poa)
 {
-  SALOMEDSClient_Study* study = NULL;
 #ifdef WIN32
   if(!_libHandle) _libHandle = ::LoadLibrary(SALOMEDS_LIB_NAME);
   if(!aCreateFactory) aCreateFactory = (STUDY_CREATE_FUNCTION)::GetProcAddress(_libHandle, STUDY_CREATE);
index ca04c276df6b7174ba58e96d75c5fc28367eb79f..7d838bc5d262159bd2071a4b47c4709d2777bd57 100644 (file)
@@ -2493,7 +2493,7 @@ bool SALOMEDSImpl_Study::DumpStudy(const std::string& thePath,
 
   sfp << std::endl;
   sfp << "if salome.sg.hasDesktop():" << std::endl;
-  sfp << "\tsalome.sg.updateObjBrowser(True)" << std::endl;
+  sfp << "\tsalome.sg.updateObjBrowser()" << std::endl;
 
   if(isDumpVisuals) { //Output the call to Session's method restoreVisualState
     sfp << "\tiparameters.getSession().restoreVisualState(1)" << std::endl;