diff --git a/src/Mod/TechDraw/App/DrawViewSection.cpp b/src/Mod/TechDraw/App/DrawViewSection.cpp index 5838475eaedd..7b555ab4a82c 100644 --- a/src/Mod/TechDraw/App/DrawViewSection.cpp +++ b/src/Mod/TechDraw/App/DrawViewSection.cpp @@ -116,7 +116,7 @@ DrawViewSection::DrawViewSection() static const char *sgroup = "Section"; static const char *fgroup = "Cut Surface Format"; - ADD_PROPERTY_TYPE(SectionSymbol ,("A"),sgroup,App::Prop_None,"The identifier for this section"); + ADD_PROPERTY_TYPE(SectionSymbol ,(""),sgroup,App::Prop_None,"The identifier for this section"); ADD_PROPERTY_TYPE(BaseView ,(0),sgroup,App::Prop_None,"2D View source for this Section"); BaseView.setScope(App::LinkScope::Global); ADD_PROPERTY_TYPE(SectionNormal ,(0,0,1.0) ,sgroup,App::Prop_None,"Section Plane normal direction"); //direction of extrusion of cutting prism @@ -162,6 +162,7 @@ short DrawViewSection::mustExecute() const void DrawViewSection::onChanged(const App::Property* prop) { +// Base::Console().Message("DVS::onChanged(%s) - restoring: %d\n", prop->getName(), isRestoring()); if (!isRestoring()) { if (prop == &SectionSymbol) { std::string lblText = "Section " + @@ -207,7 +208,7 @@ void DrawViewSection::onChanged(const App::Property* prop) App::DocumentObjectExecReturn *DrawViewSection::execute(void) { -// Base::Console().Message("DVS::execute() - %s \n", getNameInDocument()); +// Base::Console().Message("DVS::execute() - %s/%s \n", getNameInDocument(), Label.getValue()); if (!keepUpdated()) { return App::DocumentObject::StdReturn; } diff --git a/src/Mod/TechDraw/Gui/TaskSectionView.cpp b/src/Mod/TechDraw/Gui/TaskSectionView.cpp index 6bc50975ee8e..71d508b8e7c9 100644 --- a/src/Mod/TechDraw/Gui/TaskSectionView.cpp +++ b/src/Mod/TechDraw/Gui/TaskSectionView.cpp @@ -392,6 +392,13 @@ void TaskSectionView::updateSectionView(void) Command::doCommand(Command::Doc,"App.activeDocument().%s.SectionSymbol = '%s'", sectionName.c_str(), temp.c_str()); + std::string lblText = "Section " + + temp + + " - " + + temp; + Command::doCommand(Command::Doc,"App.activeDocument().%s.Label = '%s'", + sectionName.c_str(), + lblText.c_str()); Command::doCommand(Command::Doc,"App.activeDocument().%s.Scale = %0.6f", sectionName.c_str(), ui->sbScale->value());