From: vsr Date: Wed, 14 Nov 2012 08:55:22 +0000 (+0000) Subject: 0021511: EDF 2153 GEOM: Choose to take units into account or not when importing a... X-Git-Tag: V6_6_0rc1~11 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f56d6caf5fef0714970dab9acc22a0da9bc20e48;p=modules%2Fgeom.git 0021511: EDF 2153 GEOM: Choose to take units into account or not when importing a STEP file - Improve the message for asking user about need to take file units into account, to make it more clear to the user --- diff --git a/src/GEOMGUI/GEOM_msg_en.ts b/src/GEOMGUI/GEOM_msg_en.ts index 86f056120..ed57921e0 100644 --- a/src/GEOMGUI/GEOM_msg_en.ts +++ b/src/GEOMGUI/GEOM_msg_en.ts @@ -4755,8 +4755,9 @@ shells and solids on the other hand. GEOM_SCALE_DIMENSIONS - Would you like to take into account the units? -Otherwise the dimensions will be kept without modifications. + Take into account the units (%1) embedded to the file? +Ignoring units will cause model scaling (as dimensions are supposed to +be specified in meters). GEOM_ADVANCED diff --git a/src/GEOMToolsGUI/GEOMToolsGUI.cxx b/src/GEOMToolsGUI/GEOMToolsGUI.cxx index ab7c57662..ceca9830c 100644 --- a/src/GEOMToolsGUI/GEOMToolsGUI.cxx +++ b/src/GEOMToolsGUI/GEOMToolsGUI.cxx @@ -649,9 +649,9 @@ bool GEOMToolsGUI::Import() // jfa 21.08.2012 for mantis issue 21511 (STEP file units) CORBA::String_var aUnits = aInsOp->ReadValue(fileN, fileT, "LEN_UNITS"); - TCollection_AsciiString aUnitsStr (aUnits.in()); + QString aUnitsStr (aUnits.in()); bool needConvert = true; - if (aUnitsStr.IsEmpty() || aUnitsStr == "M") + if (aUnitsStr.isEmpty() || aUnitsStr == "M") needConvert = false; if (needConvert) { @@ -664,7 +664,7 @@ bool GEOMToolsGUI::Import() if (i < fileNames.count() - 1) btns = btns | SUIT_MessageBox::YesToAll | SUIT_MessageBox::NoToAll; igesAnswer = SUIT_MessageBox::question(app->desktop(), "Question",//tr("WRN_WARNING"), - tr("GEOM_SCALE_DIMENSIONS"), + tr("GEOM_SCALE_DIMENSIONS").arg(aUnitsStr), btns | SUIT_MessageBox::Cancel, SUIT_MessageBox::No); switch (igesAnswer) {