View does not appear on Redo

Crash in Page on Redo View
This commit is contained in:
WandererFan
2016-07-04 20:15:02 -04:00
committed by wmayer
parent fb397e0f8b
commit 449cbbd5bd
6 changed files with 29 additions and 4 deletions

View File

@@ -103,7 +103,7 @@ MDIViewPage::MDIViewPage(ViewProviderPage *pageVp, Gui::Document* doc, QWidget*
m_exportSVGAction = new QAction(tr("&Export SVG"), this);
connect(m_exportSVGAction, SIGNAL(triggered()), this, SLOT(saveSVG()));
//m_outlineAction is obs? never set to Enabled?
//m_outlineAction is obs? never set to Enabled?
m_outlineAction = new QAction(tr("&Outline"), this);
m_outlineAction->setEnabled(false);
m_outlineAction->setCheckable(true);
@@ -1080,6 +1080,14 @@ void MDIViewPage::selectionChanged()
continue;
TechDraw::DrawView *dimObj = dimItem->getViewObject();
if (!dimObj) {
continue;
}
const char* name = dimObj->getNameInDocument();
if (!name) { //can happen during undo/redo if Dim is selected???
//Base::Console().Log("INFO - MDIVP::selectionChanged - dimObj name is null!\n");
continue;
}
//bool accepted =
static_cast<void> (Gui::Selection().addSelection(dimObj->getDocument()->getName(),dimObj->getNameInDocument()));