TechDraw: Link related changes
* Support link and group objects * Support view sync by implementing view provider API getMDIView() * Use handleChangedPropertyType() for object migration instead of reimplementing Restore() because of a lots of changes in PropertyContainer::Restore(). * Various other small fixes.
This commit is contained in:
@@ -38,6 +38,7 @@
|
||||
#include <App/Application.h>
|
||||
#include <App/Document.h>
|
||||
#include <App/DocumentObject.h>
|
||||
#include <Gui/Application.h>
|
||||
//#include <Gui/SoFCSelection.h>
|
||||
//#include <Gui/Selection.h>
|
||||
|
||||
@@ -121,3 +122,12 @@ TechDraw::DrawHatch* ViewProviderHatch::getViewObject() const
|
||||
{
|
||||
return dynamic_cast<TechDraw::DrawHatch*>(pcObject);
|
||||
}
|
||||
|
||||
Gui::MDIView *ViewProviderHatch::getMDIView() {
|
||||
auto obj = getViewObject();
|
||||
if(!obj) return 0;
|
||||
auto vp = Gui::Application::Instance->getViewProvider(obj->getSourceView());
|
||||
if(!vp) return 0;
|
||||
return vp->getMDIView();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user