]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
0021511: EDF 2153 GEOM: Choose to take units into account or not when importing a...
authorvsr <vsr@opencascade.com>
Wed, 14 Nov 2012 08:55:22 +0000 (08:55 +0000)
committervsr <vsr@opencascade.com>
Wed, 14 Nov 2012 08:55:22 +0000 (08:55 +0000)
- Improve the message for asking user about need to take file units into account, to make it more clear to the user

src/GEOMGUI/GEOM_msg_en.ts
src/GEOMToolsGUI/GEOMToolsGUI.cxx

index 86f0561204f6796d800bba65e5eb1ee2e975a379..ed57921e04c085d9f0e7f29c61da1f6e8c4c2f33 100644 (file)
@@ -4755,8 +4755,9 @@ shells and solids on the other hand.</translation>
     </message>
     <message>
         <source>GEOM_SCALE_DIMENSIONS</source>
-        <translation>Would you like to take into account the units?
-Otherwise the dimensions will be kept without modifications.</translation>
+        <translation>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).</translation>
     </message>
     <message>
         <source>GEOM_ADVANCED</source>
index ab7c57662e83193b343f70a3fb7147b2017e9398..ceca9830c43ff0f07c4403fb0e19c26c9e02c772 100644 (file)
@@ -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) {