Part: Offset tools: do not copy sketch colors.

This commit is contained in:
PaddleStroke
2025-10-06 14:56:09 +02:00
committed by Chris Hennes
parent d109e6ea1a
commit bbfd76d064

View File

@@ -51,6 +51,7 @@
#include <Gui/WaitCursor.h>
#include <Mod/Part/App/Datums.h>
#include <Mod/Part/App/Part2DObject.h>
#include "BoxSelection.h"
#include "CrossSections.h"
@@ -1640,10 +1641,12 @@ void CmdPartOffset::activated(int iMsg)
updateActive();
doCommand(Gui,"Gui.ActiveDocument.setEdit('%s')",offset.c_str());
copyVisual(offset.c_str(), "ShapeAppearance", shape->getNameInDocument());
copyVisual(offset.c_str(), "LineColor" , shape->getNameInDocument());
copyVisual(offset.c_str(), "PointColor", shape->getNameInDocument());
if (!shape->isDerivedFrom<Part::Part2DObject>()) {
copyVisual(offset.c_str(), "ShapeAppearance", shape->getNameInDocument());
copyVisual(offset.c_str(), "LineColor", shape->getNameInDocument());
copyVisual(offset.c_str(), "PointColor", shape->getNameInDocument());
}
}
bool CmdPartOffset::isActive()
@@ -1696,9 +1699,11 @@ void CmdPartOffset2D::activated(int iMsg)
updateActive();
doCommand(Gui,"Gui.ActiveDocument.setEdit('%s')",offset.c_str());
copyVisual(offset.c_str(), "ShapeAppearance", shape->getNameInDocument());
copyVisual(offset.c_str(), "LineColor" , shape->getNameInDocument());
copyVisual(offset.c_str(), "PointColor", shape->getNameInDocument());
if (!shape->isDerivedFrom<Part::Part2DObject>()) {
copyVisual(offset.c_str(), "ShapeAppearance", shape->getNameInDocument());
copyVisual(offset.c_str(), "LineColor", shape->getNameInDocument());
copyVisual(offset.c_str(), "PointColor", shape->getNameInDocument());
}
}
bool CmdPartOffset2D::isActive()
@@ -2460,3 +2465,4 @@ void CreatePartCommands()
rcCmdMgr.addCommand(new CmdPartDatumPoint());
rcCmdMgr.addCommand(new CmdPartDatums());
}