From cb98adaa11eee70e54b988e41ad5c4a2000ec20b Mon Sep 17 00:00:00 2001 From: Annamaria Sassi Date: Tue, 3 Feb 2026 16:15:58 +0100 Subject: [PATCH] Gestione jwd vuoto --- WebWindowComplex/TableComp.razor.cs | 94 ++++++++++--------- WebWindowComplex/WebWindowComplex.csproj | 3 +- .../WebWindowConfigurator.csproj | 3 +- 3 files changed, 54 insertions(+), 46 deletions(-) diff --git a/WebWindowComplex/TableComp.razor.cs b/WebWindowComplex/TableComp.razor.cs index 2ec021c..d97a5d8 100644 --- a/WebWindowComplex/TableComp.razor.cs +++ b/WebWindowComplex/TableComp.razor.cs @@ -642,37 +642,40 @@ namespace WebWindowComplex UpdateDict(); } } - checkWarnings(); - if (SashList.Count > 0) + if (m_CurrWindow.AreaList != null && m_CurrWindow.AreaList.Count > 0) { - currAntaIndex = 0; - } - if (updRequested) - { - // se mancasse dizionario forme chiamo quello - if (LiveData.DictShape.Count == 0 && listErrLink.Count == 0) + checkWarnings(); + if (SashList.Count > 0) { - if (firstDisplay && isRendered) - { - firstDisplay = false; - // preview SVG senza HW - await DoPreviewSvg(true, true); - } - List reqList = SashList.Select(x => x.GroupId).ToList(); - if (reqList.Count > 0) - { - await DoReqShape(reqList); - } + currAntaIndex = 0; } - else + if (updRequested) { - // chiedo SVG - if (prevReq != (int)DataReq.ReqSvg || !prevLiveData.JwdEqual(LiveData.CurrJwd)) + // se mancasse dizionario forme chiamo quello + if (LiveData.DictShape.Count == 0 && listErrLink.Count == 0) { - if (prevReq != (int)DataReq.ReqHwOpt) - await DoPreviewSvg(true); - else if (LiveData.DictOptionsXml.Count > 0) - await DoPreviewSvg(true); + if (firstDisplay && isRendered) + { + firstDisplay = false; + // preview SVG senza HW + await DoPreviewSvg(true, true); + } + List reqList = SashList.Select(x => x.GroupId).ToList(); + if (reqList.Count > 0) + { + await DoReqShape(reqList); + } + } + else + { + // chiedo SVG + if (prevReq != (int)DataReq.ReqSvg || !prevLiveData.JwdEqual(LiveData.CurrJwd)) + { + if (prevReq != (int)DataReq.ReqHwOpt) + await DoPreviewSvg(true); + else if (LiveData.DictOptionsXml.Count > 0) + await DoPreviewSvg(true); + } } } } @@ -696,31 +699,34 @@ namespace WebWindowComplex m_CurrWindow = null; } m_CurrWindow = WindowFromJson.Deserialize(); - FrameWindow = m_CurrWindow.AreaList[0]; - if (m_PreviousWindow != null) + if(m_CurrWindow.AreaList != null && m_CurrWindow.AreaList.Count > 0) { - for (int i = 0; i < 2; i++) - m_CurrWindow.AreaList.First().DimensionList[i].dDimension = m_PreviousWindow.AreaList.First().DimensionList[i].dDimension; - if (m_CurrWindow.AreaList.First().Shape == Shapes.TRIANGLE) + FrameWindow = m_CurrWindow.AreaList[0]; + if (m_PreviousWindow != null) { for (int i = 0; i < 2; i++) - m_CurrWindow.AreaList.First().JointList[i].SetSelJointType(m_PreviousWindow.AreaList.First().JointList[i].SelJointType); + m_CurrWindow.AreaList.First().DimensionList[i].dDimension = m_PreviousWindow.AreaList.First().DimensionList[i].dDimension; + if (m_CurrWindow.AreaList.First().Shape == Shapes.TRIANGLE) + { + for (int i = 0; i < 2; i++) + m_CurrWindow.AreaList.First().JointList[i].SetSelJointType(m_PreviousWindow.AreaList.First().JointList[i].SelJointType); + } + else + { + for (int i = 0; i < 4; i++) + m_CurrWindow.AreaList.First().JointList[i].SetSelJointType(m_PreviousWindow.AreaList.First().JointList[i].SelJointType); + } } - else + if (m_CurrWindow != null) { - for (int i = 0; i < 4; i++) - m_CurrWindow.AreaList.First().JointList[i].SetSelJointType(m_PreviousWindow.AreaList.First().JointList[i].SelJointType); + // Aggiornamento liste sash, split, splitted, fill e itemTable + UpdateLists(); } + if (SashList.Count > 0) + currAntaIndex = 0; + // Aggiorno window con dati shape e hw option + UpdateDict(); } - if (m_CurrWindow != null) - { - // Aggiornamento liste sash, split, splitted, fill e itemTable - UpdateLists(); - } - if (SashList.Count > 0) - currAntaIndex = 0; - // Aggiorno window con dati shape e hw option - UpdateDict(); } /// diff --git a/WebWindowComplex/WebWindowComplex.csproj b/WebWindowComplex/WebWindowComplex.csproj index 59f6a6e..ecc8af0 100644 --- a/WebWindowComplex/WebWindowComplex.csproj +++ b/WebWindowComplex/WebWindowComplex.csproj @@ -6,7 +6,7 @@ net8.0 enable enable - 2.8.2.315 + 2.8.2.316 Annamaria Sassi Egalware Componente gestione Configurazioni avanzate Window per LUX @@ -41,3 +41,4 @@ + diff --git a/WebWindowConfigurator/WebWindowConfigurator.csproj b/WebWindowConfigurator/WebWindowConfigurator.csproj index 6fbe398..8477835 100644 --- a/WebWindowConfigurator/WebWindowConfigurator.csproj +++ b/WebWindowConfigurator/WebWindowConfigurator.csproj @@ -6,7 +6,7 @@ net8.0 enable enable - 2.8.2.315 + 2.8.2.316 Annamaria Sassi Egalware Componente gestione JWD per LUX @@ -47,3 +47,4 @@ +