Skip to content

Commit

Permalink
TechDraw: ProjGroup Fix dim disappearing on upgrade. And also scale a…
Browse files Browse the repository at this point in the history
…nd scaleType properties not reappearing on downgrade.
  • Loading branch information
PaddleStroke authored and WandererFan committed Aug 8, 2024
1 parent ef4d79a commit 8339bd9
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/Mod/TechDraw/Gui/TaskProjGroup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -313,8 +313,8 @@ void TaskProjGroup::turnViewToProjGroup()
viewPart->X.setValue(0.0);
viewPart->Y.setValue(0.0);
viewPart->ScaleType.setValue("Custom");
viewPart->Scale.setStatus(App::Property::Hidden, true);
viewPart->ScaleType.setStatus(App::Property::Hidden, true);
viewPart->Scale.setStatus(App::Property::Hidden, true);
viewPart->Label.setValue("Front");

multiView->addView(viewPart);
Expand All @@ -325,7 +325,7 @@ void TaskProjGroup::turnViewToProjGroup()
viewPart->LockPosition.setStatus(App::Property::ReadOnly, true); //Front should stay locked.
viewPart->LockPosition.purgeTouched();

multiView->requestPaint();//make sure the group object is on the Gui page
m_page->requestPaint();
view = multiView;

updateUi();
Expand All @@ -336,14 +336,11 @@ void TaskProjGroup::turnProjGroupToView()
TechDraw::DrawViewPart* viewPart = multiView->getAnchor();
viewPart->Scale.setValue(multiView->Scale.getValue());
viewPart->ScaleType.setValue(multiView->ScaleType.getValue());
viewPart->Scale.setStatus(App::Property::Hidden, true);
viewPart->ScaleType.setStatus(App::Property::Hidden, true);
viewPart->Scale.purgeTouched();
viewPart->ScaleType.purgeTouched();
viewPart->Scale.setStatus(App::Property::Hidden, false);
viewPart->ScaleType.setStatus(App::Property::Hidden, false);
viewPart->Label.setValue("View");
viewPart->LockPosition.setValue(false);
viewPart->LockPosition.setStatus(App::Property::ReadOnly, false);
viewPart->LockPosition.purgeTouched();
viewPart->X.setValue(multiView->X.getValue());
viewPart->Y.setValue(multiView->Y.getValue());
m_page->addView(viewPart);
Expand Down

0 comments on commit 8339bd9

Please sign in to comment.