From 89d5a8fa1a630d86a352d32ffd7689c2660e52d2 Mon Sep 17 00:00:00 2001 From: rkv Date: Tue, 12 Nov 2013 10:59:42 +0000 Subject: [PATCH] =?utf8?q?Fix=20for=20the=20bug=20#48:=20Default=20name=20?= =?utf8?q?for=20immersible=20zone=20and=20#55:=20unnecessary=20=C2=93=5F?= =?utf8?q?=C2=94=20in=20object=20names.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/HYDROGUI/HYDROGUI_CalculationOp.cxx | 2 +- src/HYDROGUI/HYDROGUI_ImmersibleZoneOp.cxx | 2 +- src/HYDROGUI/HYDROGUI_ImportBathymetryOp.cxx | 2 +- src/HYDROGUI/HYDROGUI_ImportImageOp.cxx | 2 +- src/HYDROGUI/HYDROGUI_PolylineOp.cxx | 2 +- src/HYDROGUI/HYDROGUI_Tool.cxx | 2 +- src/HYDROGUI/HYDROGUI_VisualStateOp.cxx | 2 +- src/HYDROGUI/resources/HYDROGUI_msg_en.ts | 24 ++++++++++++++++++++ 8 files changed, 31 insertions(+), 7 deletions(-) diff --git a/src/HYDROGUI/HYDROGUI_CalculationOp.cxx b/src/HYDROGUI/HYDROGUI_CalculationOp.cxx index 54241112..0433f520 100644 --- a/src/HYDROGUI/HYDROGUI_CalculationOp.cxx +++ b/src/HYDROGUI/HYDROGUI_CalculationOp.cxx @@ -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 ) diff --git a/src/HYDROGUI/HYDROGUI_ImmersibleZoneOp.cxx b/src/HYDROGUI/HYDROGUI_ImmersibleZoneOp.cxx index 56ef1cd3..2059057f 100644 --- a/src/HYDROGUI/HYDROGUI_ImmersibleZoneOp.cxx +++ b/src/HYDROGUI/HYDROGUI_ImmersibleZoneOp.cxx @@ -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() ); diff --git a/src/HYDROGUI/HYDROGUI_ImportBathymetryOp.cxx b/src/HYDROGUI/HYDROGUI_ImportBathymetryOp.cxx index 2654523a..f4237339 100644 --- a/src/HYDROGUI/HYDROGUI_ImportBathymetryOp.cxx +++ b/src/HYDROGUI/HYDROGUI_ImportBathymetryOp.cxx @@ -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 ); } } diff --git a/src/HYDROGUI/HYDROGUI_ImportImageOp.cxx b/src/HYDROGUI/HYDROGUI_ImportImageOp.cxx index cc0d9b42..d3a82f89 100644 --- a/src/HYDROGUI/HYDROGUI_ImportImageOp.cxx +++ b/src/HYDROGUI/HYDROGUI_ImportImageOp.cxx @@ -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 ); } diff --git a/src/HYDROGUI/HYDROGUI_PolylineOp.cxx b/src/HYDROGUI/HYDROGUI_PolylineOp.cxx index 83709713..33986c67 100755 --- a/src/HYDROGUI/HYDROGUI_PolylineOp.cxx +++ b/src/HYDROGUI/HYDROGUI_PolylineOp.cxx @@ -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); diff --git a/src/HYDROGUI/HYDROGUI_Tool.cxx b/src/HYDROGUI/HYDROGUI_Tool.cxx index fc1b7e5e..54a1e9fd 100644 --- a/src/HYDROGUI/HYDROGUI_Tool.cxx +++ b/src/HYDROGUI/HYDROGUI_Tool.cxx @@ -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; } } diff --git a/src/HYDROGUI/HYDROGUI_VisualStateOp.cxx b/src/HYDROGUI/HYDROGUI_VisualStateOp.cxx index 0cb4447b..58c97b42 100644 --- a/src/HYDROGUI/HYDROGUI_VisualStateOp.cxx +++ b/src/HYDROGUI/HYDROGUI_VisualStateOp.cxx @@ -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 ); } diff --git a/src/HYDROGUI/resources/HYDROGUI_msg_en.ts b/src/HYDROGUI/resources/HYDROGUI_msg_en.ts index 87f38ff7..8a445040 100644 --- a/src/HYDROGUI/resources/HYDROGUI_msg_en.ts +++ b/src/HYDROGUI/resources/HYDROGUI_msg_en.ts @@ -3,6 +3,30 @@ @default + + DEFAULT_IMAGE_NAME + Image + + + DEFAULT_POLYLINE_NAME + Polyline + + + DEFAULT_VISUAL_STATE_NAME + Visual state + + + DEFAULT_BATHYMETRY_NAME + Bathymetry + + + DEFAULT_CALCULATION_CASE_NAME + Case + + + DEFAULT_IMMERSIBLE_ZONE_NAME + Immersible zone + IMAGES IMAGES -- 2.39.2