From 408b59ee9c90bc68e5b0fa4c307723f257833ec7 Mon Sep 17 00:00:00 2001 From: Emmanuele Sassi Date: Thu, 9 Nov 2023 09:19:42 +0100 Subject: [PATCH] - miglioramento selezione BTLPart e MachGroup --- EgtBEAMWALL.ViewerOptimizer/BTLViewModel/BTLStructureVM.vb | 2 +- .../ItemParamList/BTLPartListV.xaml.vb | 6 ++++-- .../MachGroupPanel/MyMachGroupPanelVM.vb | 4 ++++ EgtBEAMWALL.ViewerOptimizer/Project/ProjectVM.vb | 5 +++-- 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/EgtBEAMWALL.ViewerOptimizer/BTLViewModel/BTLStructureVM.vb b/EgtBEAMWALL.ViewerOptimizer/BTLViewModel/BTLStructureVM.vb index af962d09..142683b8 100644 --- a/EgtBEAMWALL.ViewerOptimizer/BTLViewModel/BTLStructureVM.vb +++ b/EgtBEAMWALL.ViewerOptimizer/BTLViewModel/BTLStructureVM.vb @@ -71,7 +71,7 @@ Public Class BTLStructureVM EgtResetCurrMachGroup() End If m_PrevSelectionType = m_SelectionType - If value = m_SelectionType And Map.refProjectVM.LastSelGridType = ProjectVM.GridSelTypes.PART Then Return + If value = m_SelectionType And (Map.refProjectVM.LastSelGridType = ProjectVM.GridSelTypes.PART Or Map.refProjectVM.LastSelGridType = ProjectVM.GridSelTypes.PARTLIST) Then Return m_SelectionType = value Select Case m_SelectionType Case SelectionTypes.SELECT_ diff --git a/EgtBEAMWALL.ViewerOptimizer/ItemParamList/BTLPartListV.xaml.vb b/EgtBEAMWALL.ViewerOptimizer/ItemParamList/BTLPartListV.xaml.vb index db68854f..51f1ad96 100644 --- a/EgtBEAMWALL.ViewerOptimizer/ItemParamList/BTLPartListV.xaml.vb +++ b/EgtBEAMWALL.ViewerOptimizer/ItemParamList/BTLPartListV.xaml.vb @@ -49,6 +49,8 @@ Public Class BTLPartListV Map.refProjectVM.BTLStructureVM.SetSelectionType(BTLStructureVM.SelectionTypes.HIGHLIGHT) Map.refProjectVM.SelProdProj = ProdProj.NULL End If + ' imposto tipo di grid selezionata + If Map.refMainMenuVM.SelPage = Pages.ONLYPRODPAGE Then Map.refProjectVM.SetLastSelGridType(ProjectVM.GridSelTypes.PARTLIST) End If 'If e.ChangedButton = Input.MouseButton.Left Then ' If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift OrElse (Keyboard.Modifiers And ModifierKeys.Control) = ModifierKeys.Control Then @@ -84,9 +86,9 @@ Public Class BTLPartListV ' End If ' m_MainWindowVM.SetMouseButton("Highlight") 'End If + ' imposto tipo di grid selezionata + If Map.refMainMenuVM.SelPage = Pages.ONLYPRODPAGE Then Map.refProjectVM.SetLastSelGridType(ProjectVM.GridSelTypes.PART) End If - ' imposto tipo di grid selezionata - If Map.refMainMenuVM.SelPage = Pages.ONLYPRODPAGE Then Map.refProjectVM.SetLastSelGridType(ProjectVM.GridSelTypes.MACHGROUP) End Sub Public Shared Function FindVisualParent(Of T As DependencyObject)(ByVal child As DependencyObject) As T diff --git a/EgtBEAMWALL.ViewerOptimizer/MachGroupPanel/MyMachGroupPanelVM.vb b/EgtBEAMWALL.ViewerOptimizer/MachGroupPanel/MyMachGroupPanelVM.vb index 1e3760e6..3832cef8 100644 --- a/EgtBEAMWALL.ViewerOptimizer/MachGroupPanel/MyMachGroupPanelVM.vb +++ b/EgtBEAMWALL.ViewerOptimizer/MachGroupPanel/MyMachGroupPanelVM.vb @@ -15,6 +15,10 @@ Public Class MyMachGroupPanelVM Return m_SelectedMachGroup End Get Set(value As MyMachGroupVM) + If Map.refProjectVM.LastSelGridType = ProjectVM.GridSelTypes.PART Then + EgtBeamShowFacesName(False) + EgtBeamShowLoadingSide(False, False) + End If m_SelectedMachGroup = value If Not IsNothing(value) Then OnPreSetCurrMachGroup() diff --git a/EgtBEAMWALL.ViewerOptimizer/Project/ProjectVM.vb b/EgtBEAMWALL.ViewerOptimizer/Project/ProjectVM.vb index 0dcb214a..8c6dc67c 100644 --- a/EgtBEAMWALL.ViewerOptimizer/Project/ProjectVM.vb +++ b/EgtBEAMWALL.ViewerOptimizer/Project/ProjectVM.vb @@ -274,8 +274,9 @@ Public Class ProjectVM End Property Enum GridSelTypes As Integer - PART = 1 - MACHGROUP = 2 + PARTLIST = 1 + PART = 2 + MACHGROUP = 3 End Enum Private m_LastSelGridType As GridSelTypes Public ReadOnly Property LastSelGridType As GridSelTypes