Salome HOME
Correct misprint
[modules/shaper.git] / src / PartSet / PartSet_MenuMgr.cpp
index c65d42515b6d585fba3d8e195bed6c497166622f..d2025cf6c6b8cb4dca9c42bc517d16fabc694479 100644 (file)
@@ -1,8 +1,22 @@
-// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
-
-// File:        PartSet_MenuMgr.cpp
-// Created:     03 April 2015
-// Author:      Vitaly SMETANNIKOV
+// Copyright (C) 2014-2017  CEA/DEN, EDF R&D
+//
+// 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, 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
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or
+// email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
+//
 
 #include "PartSet_MenuMgr.h"
 #include "PartSet_Module.h"
@@ -160,10 +174,13 @@ bool PartSet_MenuMgr::addViewerMenu(const QMap<QString, QAction*>& theStdActions
         if (aCoincident.get() != NULL) {
           QList<FeaturePtr> aCoins;
           mySelectedFeature = aCoincident;
+          QList<bool> anIsAttributes;
           PartSet_Tools::findCoincidences(mySelectedFeature, myCoinsideLines, aCoins,
-                                          SketchPlugin_ConstraintCoincidence::ENTITY_A());
+                                          SketchPlugin_ConstraintCoincidence::ENTITY_A(),
+                                          anIsAttributes);
           PartSet_Tools::findCoincidences(mySelectedFeature, myCoinsideLines, aCoins,
-                                          SketchPlugin_ConstraintCoincidence::ENTITY_B());
+                                          SketchPlugin_ConstraintCoincidence::ENTITY_B(),
+                                          anIsAttributes);
           if (myCoinsideLines.size() > 0) {
             aIsDetach = true;
             QMenu* aSubMenu = new QMenu(tr("Detach"), theParent);
@@ -171,7 +188,12 @@ bool PartSet_MenuMgr::addViewerMenu(const QMap<QString, QAction*>& theStdActions
             QAction* aAction;
             int i = 0;
             foreach (FeaturePtr aCoins, myCoinsideLines) {
-              aAction = aSubMenu->addAction(aCoins->data()->name().c_str());
+              QString anItemText = aCoins->data()->name().c_str();
+#ifdef _DEBUG
+              if (anIsAttributes[i])
+                anItemText += " [attribute]";
+#endif
+              aAction = aSubMenu->addAction(anItemText);
               aAction->setData(QVariant(i));
               i++;
             }