X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSketchPlugin%2FSketchPlugin_ConstraintLength.cpp;h=ad6ee92b540721d4df98d217917d2eee2c9efc47;hb=698653a482c7a9bf408a95703097957264cf25d1;hp=f4dc4a4ffd8eac689f79181bf7274393089d8d4e;hpb=4f480152c47932671dec2ad9313c0ff9dc5d2c90;p=modules%2Fshaper.git diff --git a/src/SketchPlugin/SketchPlugin_ConstraintLength.cpp b/src/SketchPlugin/SketchPlugin_ConstraintLength.cpp index f4dc4a4ff..ad6ee92b5 100644 --- a/src/SketchPlugin/SketchPlugin_ConstraintLength.cpp +++ b/src/SketchPlugin/SketchPlugin_ConstraintLength.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2014-2017 CEA/DEN, EDF R&D +// Copyright (C) 2014-2019 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 @@ -12,14 +12,14 @@ // // 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 +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // -// See http://www.salome-platform.org/ or -// email : webmaster.salome@opencascade.com +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // #include "SketchPlugin_ConstraintLength.h" #include +#include #include @@ -171,7 +171,9 @@ AISObjectPtr SketchPlugin_ConstraintLength::getAISObject(AISObjectPtr thePreviou return thePrevious; AISObjectPtr anAIS = SketcherPrs_Factory::lengthDimensionConstraint(this, - sketch()->coordinatePlane(), thePrevious); + sketch(), thePrevious); + if (anAIS.get() && !thePrevious.get()) + SketchPlugin_Tools::setDimensionColor(anAIS); return anAIS; }