TechDraw: add Balloons
This commit is contained in:
@@ -49,6 +49,7 @@
|
||||
#include "DrawViewCollection.h"
|
||||
#include "DrawViewPart.h"
|
||||
#include "DrawViewDimension.h"
|
||||
#include "DrawViewBalloon.h"
|
||||
|
||||
#include <Mod/TechDraw/App/DrawPagePy.h> // generated from DrawPagePy.xml
|
||||
|
||||
@@ -81,9 +82,9 @@ DrawPage::DrawPage(void)
|
||||
|
||||
ADD_PROPERTY_TYPE(KeepUpdated, (autoUpdate), group, (App::PropertyType)(App::Prop_None), "Keep page in sync with model");
|
||||
ADD_PROPERTY_TYPE(Template, (0), group, (App::PropertyType)(App::Prop_None), "Attached Template");
|
||||
Template.setScope(App::LinkScope::Global);
|
||||
Template.setScope(App::LinkScope::Global);
|
||||
ADD_PROPERTY_TYPE(Views, (0), group, (App::PropertyType)(App::Prop_None), "Attached Views");
|
||||
Views.setScope(App::LinkScope::Global);
|
||||
Views.setScope(App::LinkScope::Global);
|
||||
|
||||
// Projection Properties
|
||||
ProjectionType.setEnums(ProjectionTypeEnums);
|
||||
@@ -255,8 +256,9 @@ int DrawPage::addView(App::DocumentObject *docObj)
|
||||
return -1;
|
||||
DrawView* view = static_cast<DrawView*>(docObj);
|
||||
|
||||
//position all new views in center of Page (exceptDVDimension)
|
||||
if (!docObj->isDerivedFrom(TechDraw::DrawViewDimension::getClassTypeId())) {
|
||||
//position all new views in center of Page (exceptDVDimension)
|
||||
if (!docObj->isDerivedFrom(TechDraw::DrawViewDimension::getClassTypeId()) &&
|
||||
!docObj->isDerivedFrom(TechDraw::DrawViewBalloon::getClassTypeId())) {
|
||||
view->X.setValue(getPageWidth()/2.0);
|
||||
view->Y.setValue(getPageHeight()/2.0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user