]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
Fix for the bug #48: Default name for immersible zone
authorrkv <rkv@opencascade.com>
Tue, 12 Nov 2013 10:59:42 +0000 (10:59 +0000)
committerrkv <rkv@opencascade.com>
Tue, 12 Nov 2013 10:59:42 +0000 (10:59 +0000)
and
#55: unnecessary \93_\94 in object names.

src/HYDROGUI/HYDROGUI_CalculationOp.cxx
src/HYDROGUI/HYDROGUI_ImmersibleZoneOp.cxx
src/HYDROGUI/HYDROGUI_ImportBathymetryOp.cxx
src/HYDROGUI/HYDROGUI_ImportImageOp.cxx
src/HYDROGUI/HYDROGUI_PolylineOp.cxx
src/HYDROGUI/HYDROGUI_Tool.cxx
src/HYDROGUI/HYDROGUI_VisualStateOp.cxx
src/HYDROGUI/resources/HYDROGUI_msg_en.ts

index 54241112d3d13930ca893eb7a8571d82a23b0ed2..0433f520d77185f25ee47d3340ebd532604254fc 100644 (file)
@@ -104,7 +104,7 @@ void HYDROGUI_CalculationOp::startOperation()
   }
   aPanel->setPolylineNames( aList, anEntryList );
 
-  QString anObjectName = HYDROGUI_Tool::GenerateObjectName( module(), "Case" );
+  QString anObjectName = HYDROGUI_Tool::GenerateObjectName( module(), tr( "DEFAULT_CALCULATION_CASE_NAME" ) );
 
   myEditedObject.Nullify();
   if ( myIsEdit )
index 56ef1cd39b83f9671091b1496d4c4aaff64850a9..2059057f492970c48311140ab3c68ce7f1cc2222 100644 (file)
@@ -69,7 +69,7 @@ void HYDROGUI_ImmersibleZoneOp::startOperation()
 
   aPanel->reset();
 
-  QString anObjectName = HYDROGUI_Tool::GenerateObjectName( module(), "Zone" );
+  QString anObjectName = HYDROGUI_Tool::GenerateObjectName( module(), tr( "DEFAULT_IMMERSIBLE_ZONE_NAME" ) );
 
   QColor      aFillingColor( HYDROData_ImmersibleZone::DefaultFillingColor() );
   QColor      aBorderColor( HYDROData_ImmersibleZone::DefaultBorderColor() );
index 2654523a0c8b6a0f4ec1a566d6a6a5a01f293576..f42373395f25308d26a74225173c7585104af3c3 100644 (file)
@@ -140,7 +140,7 @@ void HYDROGUI_ImportBathymetryOp::onFileSelected()
   QString anObjectName = aPanel->getObjectName().simplified();
   if ( anObjectName.isEmpty() )
   {
-    anObjectName = HYDROGUI_Tool::GenerateObjectName( module(), "Bathymetry" );
+    anObjectName = HYDROGUI_Tool::GenerateObjectName( module(), tr( "DEFAULT_BATHYMETRY_NAME" ) );
     aPanel->setObjectName( anObjectName );
   }
 }
index cc0d9b428479f70310727ef68f90e68ec6ca72f6..d3a82f89b9b147c73096e8a65dede7ee3bc5e361 100644 (file)
@@ -526,7 +526,7 @@ void HYDROGUI_ImportImageOp::onCreatePreview( QImage theImage )
         anImageName = myEditedObject->GetName();
     }
     else
-      anImageName = HYDROGUI_Tool::GenerateObjectName( module(), "Image" );
+      anImageName = HYDROGUI_Tool::GenerateObjectName( module(), tr( "DEFAULT_IMAGE_NAME" ) );
     aPanel->setImageName( anImageName );
   }
 
index 837097139053ed168f265d23ee2a390087788510..33986c67d9be5c6bb94f16e4e363aa412c456f33 100755 (executable)
@@ -104,7 +104,7 @@ void HYDROGUI_PolylineOp::startOperation()
   else{
     myCurve = new CurveCreator_Curve(CurveCreator::Dim2d);
     aPanel->setCurve(myCurve);
-    QString aNewName = HYDROGUI_Tool::GenerateObjectName( module(), "Polyline" );
+    QString aNewName = HYDROGUI_Tool::GenerateObjectName( module(), tr( "DEFAULT_POLYLINE_NAME" ) );
     aPanel->setPolylineName(aNewName);
   }
   aPanel->setCurve(myCurve);
index fc1b7e5e100e0b817851f250dc635d9825f03869..54a1e9fda28d0553f5dc24913da6d4c3c31ccd58 100644 (file)
@@ -337,7 +337,7 @@ ObjectKind HYDROGUI_Tool::GetSelectedPartition( HYDROGUI_Module* theModule )
     {
       anEntry.remove( aPrefix );
       for( ObjectKind anObjectKind = KIND_UNKNOWN + 1; anObjectKind <= KIND_LAST; anObjectKind++ )
-        if( HYDROGUI_DataModel::partitionName( anObjectKind ) == anEntry )
+        if( HYDROGUI_DataModel::tr( HYDROGUI_DataModel::partitionName( anObjectKind ).toAscii() ) == anEntry )
           return anObjectKind;
     }
   }
index 0cb4447b63fa29a2659a6730fdc3ec4b7b23793f..58c97b42c62b6d4570ed077aca5d5ebcd21ed151 100644 (file)
@@ -95,7 +95,7 @@ bool HYDROGUI_VisualStateOp::saveVisualState()
     if( aVisualState.IsNull() )
       return false;
 
-    QString aName = HYDROGUI_Tool::GenerateObjectName( module(), "VisualState" );
+    QString aName = HYDROGUI_Tool::GenerateObjectName( module(), tr( "DEFAULT_VISUAL_STATE_NAME" ) );
     aVisualState->SetName( aName );
   }
 
index 87f38ff7b047c7bdda26ee8e4c033780c0155b87..8a4450400067c7fedf0a2132c74b47a7216d29e0 100644 (file)
@@ -3,6 +3,30 @@
   
   <context>
     <name>@default</name>
+    <message>
+      <source>DEFAULT_IMAGE_NAME</source>
+      <translation>Image</translation>
+    </message>
+    <message>
+      <source>DEFAULT_POLYLINE_NAME</source>
+      <translation>Polyline</translation>
+    </message>
+    <message>
+      <source>DEFAULT_VISUAL_STATE_NAME</source>
+      <translation>Visual state</translation>
+    </message>
+    <message>
+      <source>DEFAULT_BATHYMETRY_NAME</source>
+      <translation>Bathymetry</translation>
+    </message>
+    <message>
+      <source>DEFAULT_CALCULATION_CASE_NAME</source>
+      <translation>Case</translation>
+    </message>
+    <message>
+      <source>DEFAULT_IMMERSIBLE_ZONE_NAME</source>
+      <translation>Immersible zone</translation>
+    </message>
     <message>
       <source>IMAGES</source>
       <translation>IMAGES</translation>