diff --git a/Plugin-SelectionMeshObject/MeshObjectSelectionPlugin.cc b/Plugin-SelectionMeshObject/MeshObjectSelectionPlugin.cc index fdeec33c492b2945b63cd36b6b4b160ba10cfcb0..b0ada43b5f715434124bbf812fa2495a486801fa 100644 --- a/Plugin-SelectionMeshObject/MeshObjectSelectionPlugin.cc +++ b/Plugin-SelectionMeshObject/MeshObjectSelectionPlugin.cc @@ -1452,7 +1452,7 @@ void MeshObjectSelectionPlugin::saveIniFile(INIFile& _ini, int _id) { } } -void MeshObjectSelectionPlugin::slotLoadSelection(const INIFile& _file) { +void MeshObjectSelectionPlugin::slotLoadSelection(INIFile& _file) { // Iterate over all mesh objects in the scene and save // the selections for all supported entity types @@ -1507,11 +1507,7 @@ void MeshObjectSelectionPlugin::slotSaveSelection(INIFile& _file) { // Create section for each object // Append object name to section identifier QString section = QString("MeshObjectSelection") + "//" + o_it->name(); - if(!_file.section_exists(section)) { - _file.add_section(section); - } else { - continue; - } + // Store vertex selection: _file.add_entry(section, "VertexSelection", getVertexSelection(o_it->id())); // Store edge selection: diff --git a/Plugin-SelectionMeshObject/MeshObjectSelectionPlugin.hh b/Plugin-SelectionMeshObject/MeshObjectSelectionPlugin.hh index 9ad68b99e192e3ed6b2604c6f4527d0dbf5e43d3..bc590a174dee9ff4629d2e5e6d023d2ec58930b8 100644 --- a/Plugin-SelectionMeshObject/MeshObjectSelectionPlugin.hh +++ b/Plugin-SelectionMeshObject/MeshObjectSelectionPlugin.hh @@ -158,7 +158,7 @@ private slots: void slotFloodFillSelection(QMouseEvent* _event, double _maxAngle, SelectionInterface::PrimitiveType _currentType, bool _deselect); void slotComponentsSelection(QMouseEvent* _event, SelectionInterface::PrimitiveType _currentType, bool _deselect); - void slotLoadSelection(const INIFile& _file); + void slotLoadSelection(INIFile& _file); void slotSaveSelection(INIFile& _file); void slotKeyShortcutEvent(int _key, Qt::KeyboardModifiers _modifiers); diff --git a/Plugin-SelectionObject/ObjectSelectionPlugin.cc b/Plugin-SelectionObject/ObjectSelectionPlugin.cc index 79a54d26675383d200d8ecbb34fda08e7d00497b..b13cfae28dc817a80880d585cf7988837225d0d4 100644 --- a/Plugin-SelectionObject/ObjectSelectionPlugin.cc +++ b/Plugin-SelectionObject/ObjectSelectionPlugin.cc @@ -273,7 +273,7 @@ void ObjectSelectionPlugin::saveIniFile(INIFile& _ini, int _id) { //============================================================================================== -void ObjectSelectionPlugin::slotLoadSelection(const INIFile& _file) { +void ObjectSelectionPlugin::slotLoadSelection(INIFile& _file) { // Iterate over all polyline objects in the scene and save // the selections for all supported entity types @@ -309,11 +309,6 @@ void ObjectSelectionPlugin::slotSaveSelection(INIFile& _file) { // Create section for each object // Append object name to section identifier QString section = QString("ObjectSelection") + "//" + o_it->name(); - if(!_file.section_exists(section)) { - _file.add_section(section); - } else { - continue; - } // Store vertex selection: _file.add_entry(section, "Target", getObjectSelection()); diff --git a/Plugin-SelectionObject/ObjectSelectionPlugin.hh b/Plugin-SelectionObject/ObjectSelectionPlugin.hh index cd5c145e9adaf0f8eb6ae57b85e668140642d949..06ccb1b30011fa36518de59a44e4f41a41acd95d 100644 --- a/Plugin-SelectionObject/ObjectSelectionPlugin.hh +++ b/Plugin-SelectionObject/ObjectSelectionPlugin.hh @@ -129,7 +129,7 @@ private slots: void slotToggleSelection(QMouseEvent* _event, SelectionInterface::PrimitiveType _currentType, bool _deselect); void slotVolumeLassoSelection(QMouseEvent* _event, SelectionInterface::PrimitiveType _currentType, bool _deselect); - void slotLoadSelection(const INIFile& _file); + void slotLoadSelection(INIFile& _file); void slotSaveSelection(INIFile& _file); void slotKeyShortcutEvent(int _key, Qt::KeyboardModifiers _modifiers);