Remove SectionLine on delete or cancel

This commit is contained in:
WandererFan
2017-01-04 13:57:45 -05:00
parent 78c07ced57
commit a6129b9198
2 changed files with 7 additions and 0 deletions

View File

@@ -553,6 +553,11 @@ void QGIViewPart::drawSectionLine(TechDraw::DrawViewSection* viewSection, bool b
!viewSection) {
return;
}
if (!viewSection->hasGeometry()) {
return;
}
if (b) {
QGISectionLine* sectionLine = new QGISectionLine();
addToGroup(sectionLine);

View File

@@ -302,6 +302,8 @@ bool TaskSectionView::reject()
PageName.c_str(),SectionName.c_str());
Gui::Command::doCommand(Gui::Command::Gui,"App.activeDocument().removeObject('%s')",SectionName.c_str());
Gui::Command::doCommand(Gui::Command::Gui,"Gui.ActiveDocument.resetEdit()");
m_base->touch();
m_base->getDocument()->recompute();
return false;
}