EditCoinManager: Refactor and extend layer support to use VisualLayerList property and ViewProviderSketchGeometryExtension

This commit is contained in:
Abdullah Tahiri
2023-02-28 18:38:40 +01:00
committed by abdullahtahiriyo
parent 9478870d50
commit d01edd53a2
5 changed files with 55 additions and 39 deletions

View File

@@ -493,7 +493,7 @@ EditModeCoinManager::PreselectionResult EditModeCoinManager::detectPreselection(
SoPath *path = Point->getPath();
SoNode *tail = path->getTail(); // Tail is directly the node containing points and curves
for(int l = 0; l < geometryLayerParameters.CoinLayers; l++) {
for(int l = 0; l < geometryLayerParameters.getCoinLayerCount(); l++) {
// checking for a hit in the points
if (tail == editModeScenegraphNodes.PointSet[l]) {
const SoDetail *point_detail = Point->getDetail(editModeScenegraphNodes.PointSet[l]);
@@ -812,10 +812,12 @@ int EditModeCoinManager::getApplicationLogicalDPIX() const {
void EditModeCoinManager::updateInventorNodeSizes()
{
for(int l = 0; l < geometryLayerParameters.CoinLayers; l++) {
auto layersconfiguration = viewProvider.VisualLayerList.getValues();
for(int l = 0; l < geometryLayerParameters.getCoinLayerCount(); l++) {
editModeScenegraphNodes.PointsDrawStyle[l]->pointSize = 8 * drawingParameters.pixelScalingFactor;
editModeScenegraphNodes.PointSet[l]->markerIndex = Gui::Inventor::MarkerBitmaps::getMarkerIndex("CIRCLE_FILLED", drawingParameters.markerSize);
editModeScenegraphNodes.CurvesDrawStyle[l]->lineWidth = 3 * drawingParameters.pixelScalingFactor;
editModeScenegraphNodes.CurvesDrawStyle[l]->lineWidth = layersconfiguration[l].getLineWidth() * drawingParameters.pixelScalingFactor;
}
editModeScenegraphNodes.RootCrossDrawStyle->lineWidth = 2 * drawingParameters.pixelScalingFactor;