X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FModel%2FModel_AttributeString.cpp;h=2b97d891a5c396da5249affb7ef4cba2ebe829de;hb=f36409774efce7c530518a1553946c9c76526fb9;hp=773a8bef919fbeaf61988b4080f8da2512d0e13b;hpb=8bb6d0093e663565a2144ca82f082effa766b12b;p=modules%2Fshaper.git diff --git a/src/Model/Model_AttributeString.cpp b/src/Model/Model_AttributeString.cpp index 773a8bef9..2b97d891a 100644 --- a/src/Model/Model_AttributeString.cpp +++ b/src/Model/Model_AttributeString.cpp @@ -1,8 +1,22 @@ -// Copyright (C) 2014-20xx CEA/DEN, EDF R&D - -// File: Model_AttributeString.cpp -// Created: 25 august 2014 -// Author: sbh +// 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 +// #include #include @@ -37,6 +51,11 @@ std::string Model_AttributeString::value() Model_AttributeString::Model_AttributeString(TDF_Label& theLabel) { myLab = theLabel; + reinit(); +} + +void Model_AttributeString::reinit() +{ // check the attribute could be already presented in this doc (after load document) - myIsInitialized = theLabel.FindAttribute(TDataStd_Name::GetID(), myString) == Standard_True; + myIsInitialized = myLab.FindAttribute(TDataStd_Name::GetID(), myString) == Standard_True; }