Salome HOME
Typo-fix by Kunda
[modules/geom.git] / src / GEOMToolsGUI / GEOMToolsGUI_MaterialPropertiesDlg.cxx
index 61c7c763d4936d5ed1ff09bc9202c0da4dd569df..c96f808218bb85cc77355451293202ac9580cd0e 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2016  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 // License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -36,7 +36,7 @@
 #include <SUIT_ResourceMgr.h>
 #include <SUIT_Session.h>
 #include <SUIT_ViewManager.h>
-#include <SALOME_ListIteratorOfListIO.hxx>
+#include <SALOME_ListIO.hxx>
 #include <OCCViewer_ViewModel.h>
 #include <SVTK_ViewModel.h>
 #include <SVTK_ViewWindow.h>
@@ -67,7 +67,7 @@
 */
 
 /*!
-  \brief Contructor
+  \brief Constructor
  */
 GEOMToolsGUI_MaterialList::GEOMToolsGUI_MaterialList( QWidget* parent )
   : QListWidget( parent )
@@ -101,7 +101,7 @@ GEOMToolsGUI_MaterialPropertiesDlg::GEOMToolsGUI_MaterialPropertiesDlg( QWidget*
   myShowSelWidget = showSelWidget;
   // Set title
   setWindowTitle( tr( "MATERIAL_PROPERTIES_TLT" ) );
-       
+        
   // main layout
   QVBoxLayout* main = new QVBoxLayout( mainFrame() );
   main->setMargin( 0 );
@@ -328,8 +328,8 @@ GEOMToolsGUI_MaterialPropertiesDlg::GEOMToolsGUI_MaterialPropertiesDlg( QWidget*
         SUIT_ViewWindow* window = app->desktop()->activeWindow();
         if ( window ) {
           int mgrId = window->getViewManager()->getGlobalId();
-          PropMap propMap = study->getObjectPropMap( mgrId, io->getEntry() );
-          QString matProp = propMap.value(GEOM::propertyName( GEOM::Material )).toString();        
+          PropMap propMap = study->getObjectProperties( mgrId, io->getEntry() );
+          QString matProp = propMap.value(GEOM::propertyName( GEOM::Material )).toString();         
           if ( !matProp.isEmpty() )
             myCurrentModel.fromProperties( matProp );
           QColor c = propMap.value(GEOM::propertyName( GEOM::Color )).value<QColor>();
@@ -625,10 +625,10 @@ void GEOMToolsGUI_MaterialPropertiesDlg::onChanged()
     // it is no allowed to change global material
     // user is asked about creating of a new user material model based on the currently selected one
     if ( SUIT_MessageBox::question( this,
-                                   tr( "GEOM_WRN_WARNING" ),
-                                   tr( "QUE_CREATE_NEW_MATERIAL" ),
-                                   QMessageBox::Yes | QMessageBox::No,
-                                   QMessageBox::Yes ) == QMessageBox::Yes ) {
+                                    tr( "GEOM_WRN_WARNING" ),
+                                    tr( "QUE_CREATE_NEW_MATERIAL" ),
+                                    QMessageBox::Yes | QMessageBox::No,
+                                    QMessageBox::Yes ) == QMessageBox::Yes ) {
       // user has chosen creation of new user model
       onAddMaterial();
     }
@@ -708,10 +708,10 @@ void GEOMToolsGUI_MaterialPropertiesDlg::onDeleteMaterial()
   QListWidgetItem* item = myMaterials->currentItem();
   if ( item && item->data( TypeRole ).toInt() == User ) {
     if ( SUIT_MessageBox::question( this,
-                                   tr( "GEOM_WRN_WARNING" ),
-                                   tr( "QUE_REMOVE_MATERIAL" ).arg( item->text() ),
-                                   QMessageBox::Yes | QMessageBox::No,
-                                   QMessageBox::Yes ) == QMessageBox::Yes ) {
+                                    tr( "GEOM_WRN_WARNING" ),
+                                    tr( "QUE_REMOVE_MATERIAL" ).arg( item->text() ),
+                                    QMessageBox::Yes | QMessageBox::No,
+                                    QMessageBox::Yes ) == QMessageBox::Yes ) {
       myResourceMgr.remove( item->data( NameRole ).toString() );
       delete item;
     }
@@ -758,7 +758,7 @@ void GEOMToolsGUI_MaterialPropertiesDlg::SetEditCurrentArgument()
   // enable line edit
   myLineEditCurArg->setEnabled(true);
   myLineEditCurArg->setFocus();
-       SelectionIntoArgument();
+        SelectionIntoArgument();
   // after setFocus(), because it will be setDown(false) when loses focus
   send->setDown(true);
   }
@@ -778,7 +778,7 @@ void GEOMToolsGUI_MaterialPropertiesDlg::SelectionIntoArgument()
   if ( study ) {
     SALOME_ListIO aSelList;
     aSelMgr->selectedObjects(aSelList);
-               int nbSel = GEOMBase::GetNameOfSelectedIObjects(aSelList, aString, true);
-       }
+    /*int nbSel = */GEOMBase::GetNameOfSelectedIObjects(aSelList, aString, true);
+  }
   myLineEditCurArg->setText( aString );
 }