Fix Section arrows,xDir,label

This commit is contained in:
WandererFan
2016-08-30 20:20:42 -04:00
parent 32ba9c202d
commit 1bf2dc7411
12 changed files with 179 additions and 146 deletions

View File

@@ -79,6 +79,7 @@ DrawView::~DrawView()
App::DocumentObjectExecReturn *DrawView::execute(void)
{
Base::Console().Message("TRACE - DV::execute\n");
TechDraw::DrawPage *page = findParentPage();
if(page) {
if (ScaleType.isValue("Document")) {
@@ -101,9 +102,7 @@ App::DocumentObjectExecReturn *DrawView::execute(void)
void DrawView::onChanged(const App::Property* prop)
{
if (!isRestoring()) {
if (prop == &Scale) {
execute();
} else if (prop == &ScaleType) {
if (prop == &ScaleType) {
if (ScaleType.isValue("Document")) {
Scale.setStatus(App::Property::ReadOnly,true);
App::GetApplication().signalChangePropertyEditor(Scale);
@@ -114,21 +113,34 @@ void DrawView::onChanged(const App::Property* prop)
Scale.setStatus(App::Property::ReadOnly,true);
App::GetApplication().signalChangePropertyEditor(Scale);
}
execute();
} else if (prop == &X ||
prop == &Y) {
if (isMouseMove()) {
setAutoPos(false); //should only be for manual changes? not programmatic changes?
}
execute();
} else if (prop == &Rotation) {
execute();
}
}
App::DocumentObject::onChanged(prop);
}
short DrawView::mustExecute() const
{
short result = 0;
if (!isRestoring()) {
result = (X.isTouched() ||
Y.isTouched() ||
Rotation.isTouched() ||
Scale.isTouched() ||
ScaleType.isTouched() );
}
if (result) {
return result;
} else {
return App::DocumentObject::mustExecute();
}
}
////you must override this in derived class
QRectF DrawView::getRect() const
{