[TD] add missing repaints for DrawView

- this enables to see e.g. changes of the rotation of all kinds of views directly

- also fix a bug, see https://forum.freecadweb.org/viewtopic.php?f=35&t=44571
This commit is contained in:
donovaly
2020-03-26 01:40:46 +01:00
committed by WandererFan
parent be694170a5
commit 8c45bef57c
2 changed files with 14 additions and 5 deletions

View File

@@ -424,12 +424,12 @@ App::DocumentObject * DrawProjGroup::addProjection(const char *viewProjType)
throw Base::TypeError("Error: new projection is not a DPGI!");
}
if (view != nullptr) { //coverity CID 151722
// the label must be set before the view is added
view->Label.setValue(viewProjType);
addView(view); //from DrawViewCollection
view->Source.setValues( Source.getValues() );
view->Scale.setValue( getScale() );
view->Type.setValue( viewProjType );
view->Label.setValue( viewProjType );
view->Source.setValues( Source.getValues() );
view->Source.setValues(Source.getValues());
// the Scale is already set by DrawView
view->Type.setValue(viewProjType);
if (strcmp(viewProjType, "Front") != 0 ) { //not Front!
vecs = getDirsFromFront(view);
view->Direction.setValue(vecs.first);