[TD]fix Front lock icon in DPG
This commit is contained in:
@@ -102,6 +102,7 @@ void DrawProjGroupItem::onChanged(const App::Property *prop)
|
||||
bool DrawProjGroupItem::isLocked(void) const
|
||||
{
|
||||
bool isLocked = DrawView::isLocked();
|
||||
|
||||
if (isAnchor()) { //Anchor view is always locked to DPG
|
||||
return true;
|
||||
}
|
||||
@@ -112,6 +113,24 @@ bool DrawProjGroupItem::isLocked(void) const
|
||||
return isLocked;
|
||||
}
|
||||
|
||||
bool DrawProjGroupItem::showLock(void) const
|
||||
{
|
||||
bool result = DrawView::showLock();
|
||||
DrawProjGroup* parent = getPGroup();
|
||||
bool parentLock = false;
|
||||
if (parent != nullptr) {
|
||||
parentLock = parent->LockPosition.getValue();
|
||||
}
|
||||
|
||||
if (isAnchor() && //don't show lock for Front if DPG is not locked
|
||||
!parentLock) {
|
||||
result = false;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
App::DocumentObjectExecReturn *DrawProjGroupItem::execute(void)
|
||||
{
|
||||
if (DrawUtil::checkParallel(Direction.getValue(),
|
||||
|
||||
Reference in New Issue
Block a user