Salome HOME
Updated copyright comment
[modules/geom.git] / src / GEOMToolsGUI / GEOMToolsGUI.cxx
index 1f5bc409dae02e4379c860e8a8196d2ced5d6a15..639c370caad6adc53a4fc9702e52ede4b60dea6a 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2016  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2024  CEA, EDF, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -93,8 +93,8 @@ static bool inUse( const QString& component, const QMap<QString,QString>& object
   std::list<_PTR(SObject)> aSelectedSO;
   for ( oit = objects.begin(); oit != objects.end(); ++oit )
   {
-    _PTR(SObject) so = study->FindObjectID( oit.key().toLatin1().data() );
-    if ( !so )
+    _PTR(SObject) so = study->FindObjectID( oit.key().toUtf8().data() );
+    if ( !GeometryGUI::IsInGeomComponent( so ))
       continue;
     aSelectedSO.push_back(so);
     CORBA::Object_var        corbaObj_rem = GeometryGUI::ClientSObjectToObject( so );
@@ -206,7 +206,7 @@ GEOMToolsGUI::~GEOMToolsGUI()
 // function : OnGUIEvent()
 // purpose  :
 //=======================================================================
-bool GEOMToolsGUI::OnGUIEvent(int theCommandID, SUIT_Desktop* parent)
+bool GEOMToolsGUI::OnGUIEvent(int theCommandID, SUIT_Desktop* /*parent*/)
 {
   getGeometryGUI()->EmitSignalDeactivateDialog();
 
@@ -335,7 +335,7 @@ bool GEOMToolsGUI::OnGUIEvent(int theCommandID, SUIT_Desktop* parent)
 // function : OnGUIEvent()
 // purpose  :
 //=======================================================================
-bool GEOMToolsGUI::OnGUIEvent(int theCommandID, SUIT_Desktop* parent, const QVariant& theParam )
+bool GEOMToolsGUI::OnGUIEvent(int theCommandID, SUIT_Desktop* /*parent*/, const QVariant& theParam )
 {
   getGeometryGUI()->EmitSignalDeactivateDialog();
 
@@ -398,7 +398,7 @@ void GEOMToolsGUI::OnEditDelete()
       continue; // invalid object
     // ...
     QString entry = anIObject->getEntry();
-    _PTR(SObject) obj = aStudy->FindObjectID( entry.toLatin1().data() );
+    _PTR(SObject) obj = aStudy->FindObjectID( entry.toUtf8().data() );
     // check parent component
     QString parentComp = getParentComponent( obj );
     if ( parentComp != geomComp )  {
@@ -471,7 +471,7 @@ void GEOMToolsGUI::OnEditDelete()
 
   if ( isComponentSelected ) {
     // GEOM component is selected: delete all objects recursively
-    _PTR(SObject) comp = aStudy->FindObjectID( geomComp.toLatin1().data() );
+    _PTR(SObject) comp = aStudy->FindObjectID( geomComp.toUtf8().data() );
     if ( !comp )
       return;
     _PTR(ChildIterator) it ( aStudy->NewChildIterator( comp ) );
@@ -499,7 +499,7 @@ void GEOMToolsGUI::OnEditDelete()
     // ... and then delete all objects
     QMap<QString, QString>::Iterator it;
     for ( it = toBeDeleted.begin(); it != toBeDeleted.end(); ++it ) {
-      _PTR(SObject) obj ( aStudy->FindObjectID( it.key().toLatin1().data() ) );
+      _PTR(SObject) obj ( aStudy->FindObjectID( it.key().toUtf8().data() ) );
       // remove object from GEOM engine
       removeObjectWithChildren( obj, views, &disp );
       // remove objects from study
@@ -509,7 +509,7 @@ void GEOMToolsGUI::OnEditDelete()
     }
     // ... and then delete all folders
     for ( it = toBeDelFolders.begin(); it != toBeDelFolders.end(); ++it ) {
-      _PTR(SObject) obj ( aStudy->FindObjectID( it.key().toLatin1().data() ) );
+      _PTR(SObject) obj ( aStudy->FindObjectID( it.key().toUtf8().data() ) );
       // remove object from GEOM engine
       removeObjectWithChildren( obj, views, &disp );
       // remove objects from study