Salome HOME
1) Exception on [Cancel] when closing a study. 2) Reload does not work
authoreap <eap@opencascade.com>
Fri, 3 Aug 2018 11:08:26 +0000 (14:08 +0300)
committereap <eap@opencascade.com>
Fri, 3 Aug 2018 11:08:26 +0000 (14:08 +0300)
3) some compilation warnings

src/SalomeApp/SalomeApp_Application.cxx
src/SalomeApp/SalomeApp_DataObject.cxx
src/SalomeApp/SalomeApp_Study.cxx

index ec97e8c9d10112e2f392d1c0c8165a6c339f17b5..635bb2bbbff9e2f32bcd4d326ecda73f3d8f25f3 100644 (file)
@@ -252,14 +252,14 @@ void SalomeApp_Application::start()
         if ( !getStudy()->GetProperties()->IsLocked() ) {
           // pyfiles[j] is a dictionary: {"/absolute/path/to/script.py": [script_args]}
           // Path is absolute, script has .py extension
-          for (uint j = 0; j < pyfiles.count(); j++ ) {
+          for (int j = 0; j < pyfiles.count(); j++ ) {
             // Extract scripts and their arguments, if any
             QRegExp rxp ("\"(.+)\":[\\s]*\\[(.*)\\]");
             if ( rxp.indexIn( pyfiles[j] ) >= 0 && rxp.capturedTexts().count() == 3 ) {
               QString script = rxp.capturedTexts()[1];
               QString args = "";
               QStringList argList = __getArgsList(rxp.capturedTexts()[2]);
-              for (uint k = 0; k < argList.count(); k++ ) {
+              for (int k = 0; k < argList.count(); k++ ) {
                 QString arg = argList[k].trimmed();
                 arg.remove( QRegExp("^[\"]") );
                 arg.remove( QRegExp("[\"]$") );
@@ -1658,7 +1658,7 @@ void SalomeApp_Application::updateSavePointDataObjects( SalomeApp_Study* study )
 
   // iterate new save points.  if DataObject with such ID not found in map - create DataObject
   // if in the map - remove it from map.
-  for ( int i = 0; i < savePoints.size(); i++ )
+  for ( size_t i = 0; i < savePoints.size(); i++ )
     if ( !mapDO.contains( savePoints[i] ) )
       new SalomeApp_SavePointObject( guiRootObj, savePoints[i], study );
     else
index 2f41905198aeed9fb2400cabfe8f8daeef4b6e24..4927cc6308f07da68cc823adf064dc7ef09ff50c 100644 (file)
@@ -827,13 +827,13 @@ QString SalomeApp_RootObject::toolTip( const int id ) const
   \param id save point ID
   \param study study
 */
-SalomeApp_SavePointObject::SalomeApp_SavePointObject( SUIT_DataObject* parent, 
-                                                      const int id, 
+SalomeApp_SavePointObject::SalomeApp_SavePointObject( SUIT_DataObject* parent,
+                                                      const int id,
                                                       SalomeApp_Study* study )
-: LightApp_DataObject( parent ), 
-  CAM_DataObject( parent ),
-  myId( id ),
-  myStudy( study )
+  : CAM_DataObject( parent ),
+    LightApp_DataObject( parent ),
+    myId( id ),
+    myStudy( study )
 {
 }
 
index a902c11e1bd26eb2cf754b919d9ea1d52001e004..a7db412c73e29d3be8f1fb3033e3e1f063da2168 100644 (file)
@@ -432,7 +432,9 @@ QString SalomeApp_Study::studyName() const
   // it can be changed outside of GUI
   // TEMPORARILY SOLUTION: better to be implemented with help of SALOMEDS observers
   if ( studyDS() ) {
-    QString newName = QString::fromUtf8(studyDS()->Name().c_str());
+    QString newName = QString::fromUtf8(studyDS()->URL().c_str());
+    if ( newName.isEmpty() )
+      newName = QString::fromUtf8(studyDS()->Name().c_str());
     if ( LightApp_Study::studyName() != newName ) {
       SalomeApp_Study* that = const_cast<SalomeApp_Study*>( this );
       that->setStudyName( newName );