From 7564dbdc0bcc2f71b86db8a6c3502fb4ae087d03 Mon Sep 17 00:00:00 2001 From: SaraP Date: Tue, 2 Dec 2025 10:25:56 +0100 Subject: [PATCH] DataWindow : - correzione errore nella preview con soglia - migliora nella preview maniglia. --- Designing/WinLib/WinCalculate.lua | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/Designing/WinLib/WinCalculate.lua b/Designing/WinLib/WinCalculate.lua index 28256b7..2db9d20 100644 --- a/Designing/WinLib/WinCalculate.lua +++ b/Designing/WinLib/WinCalculate.lua @@ -5738,8 +5738,13 @@ local function DrawHandlePreview( nOutlineId, sHandleSide, dHandleH, nLayerId, b local nProfileLayId = EgtGetFirstNameInGroup( nPartId, WIN_PROFILE) local nMainProfileId = EgtGetFirstNameInGroup( nProfileLayId, WIN_PRF_MAIN) local b3Profile = GetProfileLocalBox( nMainProfileId) - local dSide = 0.33 * b3Profile:getDimX() - + local nParentAreaId = EgtGetParent( EgtGetParent( nOutlineId)) + local nSashType = EgtGetInfo( nParentAreaId, WIN_SASHTYPE, 'i') + local dSide = 0.5 * b3Profile:getDimX() + if nSashType == WIN_SASHTYPES.ACTIVE or nSashType == WIN_SASHTYPES.ACTIVE_IN then + dSide = 0.33 * b3Profile:getDimX() + end + -- punto su cui centrare la maniglia local ptC = ptRef - dHandleH * vtDir + dSide * vtDirIn + Z_AX() @@ -7119,7 +7124,7 @@ local function CalcPartPreview( nPartId, nPreviewGrp) CopyInfo( nCrvId, vGeoLeft[i], WIN_TANG_END, false) end - elseif nStartJoint == WIN_PART_JNT.FULL then + else -- full -- nel caso di curva su split french con anta inactive bisogna considerare il bordo del pezzo active, altrimenti considero l'out del pezzo precedente local sProfileType = EgtGetInfo( vPrevProfileId[i], WIN_PRF_TYPE) if sProfileType == WIN_SASH_INACTIVE or sProfileType == WIN_FRENCH_OUT then @@ -7189,7 +7194,7 @@ local function CalcPartPreview( nPartId, nPreviewGrp) CopyInfo( nCrvId, vGeoRight[i], WIN_TANG_END, false) end - elseif nEndJoint == WIN_PART_JNT.FULL then + else -- full local sProfileType = EgtGetInfo( vNextProfileId[i], WIN_PRF_TYPE) if sProfileType == WIN_SASH_INACTIVE or sProfileType == WIN_FRENCH_OUT then