]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
ID 0019877: EDF VISU : No warning for delete actions in Visu module
authordmv <dmv@opencascade.com>
Mon, 9 Jun 2008 06:16:42 +0000 (06:16 +0000)
committerdmv <dmv@opencascade.com>
Mon, 9 Jun 2008 06:16:42 +0000 (06:16 +0000)
src/VISUGUI/VISU_msg_en.po
src/VISUGUI/VisuGUI.cxx

index d34fd121bb4d53da3bb4c900660b5445e0cbdd30..087b4d9b38acb40b2fadf36095fb810e38a9c013 100644 (file)
@@ -67,6 +67,10 @@ msgstr "Can't create actor for this presentation"
 msgid "ERR_CANT_CREATE_ANIMATION"
 msgstr "Can't create animation for these fields:\n number of time stamps or number of components is not the same!"
 
+msgid "VISU_REALLY_DELETE"
+msgstr "Do you really want to delete this %1 object(s): %2"
+
+
 # Preferences for VISU module (VisuGUI.cxx)
 
 msgid "VISU_SCALAR_BAR"
@@ -237,6 +241,9 @@ msgstr "Use Shading"
 msgid "VISU_DISP_ONLY"
 msgstr "Display only on creation"
 
+msgid "VISU_FLOATING_POINT_PRECISION"
+msgstr "Floating Point Precision"
+
 msgid "VISU_AUTOMATIC_FIT_ALL"
 msgstr "Automatic Fit All"
 
index ffd912f4c45bc96b826e63cd8cf1784a04642b46..bd362c51a5cfc31fb2db47028f1aa49b2736f9f3 100644 (file)
@@ -1283,9 +1283,12 @@ VisuGUI
   if (nbSelected < 1) return;
 
   std::vector<std::string> anEntries (nbSelected);
+  QString aNameList;
   Handle(SALOME_InteractiveObject) anIO;
   for (SALOME_ListIteratorOfListIO it (aList); it.More(); it.Next()) {
     anIO = it.Value();
+    aNameList.append("\n    - ");
+    aNameList.append(anIO->getName());
     if (anIO->hasEntry()) {
       if (IsRemovable(anIO->getEntry(), this))
         anEntries[i++] = anIO->getEntry();
@@ -1299,6 +1302,13 @@ VisuGUI
                            QObject::tr("BUT_OK"));
   }
 
+  if ( SUIT_MessageBox::warn2( GetDesktop(this),
+                              QObject::tr( "WRN_VISU" ),
+                              QObject::tr( "VISU_REALLY_DELETE" ).arg( nbSelected ).arg( aNameList ),
+                              QObject::tr( "BUT_YES" ),
+                              QObject::tr( "BUT_NO" ), 1, 0, 0 ) != 1 )
+    return;
+
   // There is a transaction
   _PTR(StudyBuilder) aStudyBuilder = aCStudy->NewBuilder();
   aStudyBuilder->NewCommand();
@@ -3461,6 +3471,13 @@ void VisuGUI::createPreferences()
   setPreferenceProperty( scalar_def_represent, "strings", modes1 );
   setPreferenceProperty( scalar_def_represent, "indexes", indices1 );
   addPreference( tr( "VISU_SHRINK" ), representGr, LightApp_Preferences::Bool, "VISU", "scalar_def_shrink" );
+
+  int point_precision = addPreference( tr( "VISU_FLOATING_POINT_PRECISION" ), representGr,
+                                      LightApp_Preferences::IntSpin, "VISU", "floating_point_precision" );
+  setPreferenceProperty( point_precision, "min", 1 );
+  setPreferenceProperty( point_precision, "max", 16 );
+  setPreferenceProperty( point_precision, "step", 1 );
+  addPreference( "", representGr, LightApp_Preferences::Space );
   
   addPreference( tr( "VISU_USE_SHADING" ), representGr,
                  LightApp_Preferences::Bool, "VISU", "represent_shading" );