diff --git a/Icarus/FilledSolidPanel/FilledSolidPanelVM.vb b/Icarus/FilledSolidPanel/FilledSolidPanelVM.vb index 069a3f2..5c53a33 100644 --- a/Icarus/FilledSolidPanel/FilledSolidPanelVM.vb +++ b/Icarus/FilledSolidPanel/FilledSolidPanelVM.vb @@ -353,8 +353,8 @@ Public Class FilledSolidPanelVM NotifyPropertyChanged(NameOf(bRotate_IsChecked)) Map.refRightPanelVM.SetSelPanel(RightPanelVM.Panels.AUXSOLIDPARAM) NotifyPropertyChanged(NameOf(FilledSolidList_IsEnabled)) - ' disattivo lista filled solid - SetFilledSolidListIsEnabled(False) + ' disattivo interfaccia + ManageInterface(False) Else NotifyPropertyChanged(NameOf(m_bMachParam_IsChecked)) End If @@ -364,6 +364,8 @@ Public Class FilledSolidPanelVM m_bMachParam_IsChecked = False NotifyPropertyChanged(NameOf(bMachParam_IsChecked)) NotifyPropertyChanged(NameOf(FilledSolidList_IsEnabled)) + ' riattivo interfaccia + ManageInterface(True) End Sub Public ReadOnly Property Compo_Visibility As Visibility @@ -622,8 +624,13 @@ Public Class FilledSolidPanelVM EgtSelectObj(m_SelFilledSolid.nCurveId) Case FilledSolidSelectionTypes.EXTRUSION ' creo layer per estrusione - Dim nNewExtrusionLayerId As Integer = EgtCreateGroup(m_nPartId) - EgtSetName(nNewExtrusionLayerId, LAY_NEWEXTRUSION) + Dim nNewExtrusionLayerId As Integer = EgtGetFirstNameInGroup(m_nPartId, LAY_NEWEXTRUSION) + If nNewExtrusionLayerId = GDB_ID.NULL Then + nNewExtrusionLayerId = EgtCreateGroup(m_nPartId) + EgtSetName(nNewExtrusionLayerId, LAY_NEWEXTRUSION) + Else + EgtEmptyGroup(nNewExtrusionLayerId) + End If EgtSetCurrPartLayer(m_nPartId, nNewExtrusionLayerId) EgtSelectObj(m_SelFilledSolid.nCurveId) Case FilledSolidSelectionTypes.BOTH @@ -1219,6 +1226,7 @@ Public Class FilledSolidPanelVM ''' Public Sub CPlaneElevation(ByVal param As Object) If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return + ManageInterface(False) Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ELEVATION) End Sub @@ -1243,6 +1251,7 @@ Public Class FilledSolidPanelVM ''' Public Sub CPlaneOrigin(ByVal param As Object) If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return + ManageInterface(False) Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ORIGIN) End Sub diff --git a/Icarus/RibPanel/RibPanelVM.vb b/Icarus/RibPanel/RibPanelVM.vb index 62a790b..cf6896c 100644 --- a/Icarus/RibPanel/RibPanelVM.vb +++ b/Icarus/RibPanel/RibPanelVM.vb @@ -378,8 +378,8 @@ Public Class RibPanelVM NotifyPropertyChanged(NameOf(bRotate_IsChecked)) Map.refRightPanelVM.SetSelPanel(RightPanelVM.Panels.RIBPARAM) NotifyPropertyChanged(NameOf(RibList_IsEnabled)) - ' disattivo lista ribs - SetRibListIsEnabled(False) + ' disattivo interfaccia + ManageInterface(False) Else NotifyPropertyChanged(NameOf(m_bMachParam_IsChecked)) End If @@ -389,6 +389,8 @@ Public Class RibPanelVM m_bMachParam_IsChecked = False NotifyPropertyChanged(NameOf(bMachParam_IsChecked)) NotifyPropertyChanged(NameOf(RibList_IsEnabled)) + ' riattivo interfaccia + ManageInterface(True) End Sub Public ReadOnly Property Compo_Visibility As Visibility @@ -647,8 +649,13 @@ Public Class RibPanelVM EgtSelectObj(m_SelRib.nCurveId) Case RibSelectionTypes.EXTRUSION ' creo layer per estrusione - Dim nNewExtrusionLayerId As Integer = EgtCreateGroup(m_nPartId) - EgtSetName(nNewExtrusionLayerId, LAY_NEWEXTRUSION) + Dim nNewExtrusionLayerId As Integer = EgtGetFirstNameInGroup(m_nPartId, LAY_NEWEXTRUSION) + If nNewExtrusionLayerId = GDB_ID.NULL Then + nNewExtrusionLayerId = EgtCreateGroup(m_nPartId) + EgtSetName(nNewExtrusionLayerId, LAY_NEWEXTRUSION) + Else + EgtEmptyGroup(nNewExtrusionLayerId) + End If EgtSetCurrPartLayer(m_nPartId, nNewExtrusionLayerId) EgtSelectObj(m_SelRib.nCurveId) Case RibSelectionTypes.BOTH @@ -950,7 +957,7 @@ Public Class RibPanelVM Else SelRib = Nothing m_bEdit_IsChecked = False - NotifyPropertyChanged(NameOf( bEdit_IsChecked)) + NotifyPropertyChanged(NameOf(bEdit_IsChecked)) End If NotifyPropertyChanged(NameOf(SelRib)) End If @@ -1238,6 +1245,7 @@ Public Class RibPanelVM ''' Public Sub CPlaneElevation(ByVal param As Object) If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return + ManageInterface(False) Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ELEVATION) End Sub @@ -1262,6 +1270,7 @@ Public Class RibPanelVM ''' Public Sub CPlaneOrigin(ByVal param As Object) If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return + ManageInterface(False) Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ORIGIN) End Sub diff --git a/Icarus/ShellNumberPanel/ShellNumberPanelVM.vb b/Icarus/ShellNumberPanel/ShellNumberPanelVM.vb index c374ea7..05d22ba 100644 --- a/Icarus/ShellNumberPanel/ShellNumberPanelVM.vb +++ b/Icarus/ShellNumberPanel/ShellNumberPanelVM.vb @@ -358,8 +358,8 @@ Public Class ShellNumberPanelVM NotifyPropertyChanged(NameOf(bRotate_IsChecked)) Map.refRightPanelVM.SetSelPanel(RightPanelVM.Panels.SHELLNUMBERPARAM) NotifyPropertyChanged(NameOf(ShellNumberList_IsEnabled)) - ' disattivo lista shell number - SetShellNumberListIsEnabled(False) + ' disattivo interfaccia + ManageInterface(False) Else NotifyPropertyChanged(NameOf(m_bMachParam_IsChecked)) End If @@ -369,6 +369,8 @@ Public Class ShellNumberPanelVM m_bMachParam_IsChecked = False NotifyPropertyChanged(NameOf(bMachParam_IsChecked)) NotifyPropertyChanged(NameOf(ShellNumberList_IsEnabled)) + ' riattivo interfaccia + ManageInterface(True) End Sub Public ReadOnly Property Compo_Visibility As Visibility @@ -627,8 +629,13 @@ Public Class ShellNumberPanelVM EgtSelectObj(m_SelShellNumber.nCurveId) Case ShellNumberSelectionTypes.EXTRUSION ' creo layer per estrusione - Dim nNewExtrusionLayerId As Integer = EgtCreateGroup(m_nPartId) - EgtSetName(nNewExtrusionLayerId, LAY_NEWEXTRUSION) + Dim nNewExtrusionLayerId As Integer = EgtGetFirstNameInGroup(m_nPartId, LAY_NEWEXTRUSION) + If nNewExtrusionLayerId = GDB_ID.NULL Then + nNewExtrusionLayerId = EgtCreateGroup(m_nPartId) + EgtSetName(nNewExtrusionLayerId, LAY_NEWEXTRUSION) + Else + EgtEmptyGroup(nNewExtrusionLayerId) + End If EgtSetCurrPartLayer(m_nPartId, nNewExtrusionLayerId) EgtSelectObj(m_SelShellNumber.nCurveId) Case ShellNumberSelectionTypes.BOTH @@ -1225,6 +1232,7 @@ Public Class ShellNumberPanelVM ''' Public Sub CPlaneElevation(ByVal param As Object) If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return + ManageInterface(False) Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ELEVATION) End Sub @@ -1249,6 +1257,7 @@ Public Class ShellNumberPanelVM ''' Public Sub CPlaneOrigin(ByVal param As Object) If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return + ManageInterface(False) Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ORIGIN) End Sub diff --git a/Icarus/StartMachPanel/StartMachPanelVM.vb b/Icarus/StartMachPanel/StartMachPanelVM.vb index 387ccc0..7b97fb2 100644 --- a/Icarus/StartMachPanel/StartMachPanelVM.vb +++ b/Icarus/StartMachPanel/StartMachPanelVM.vb @@ -928,6 +928,7 @@ Public Class StartMachPanelVM ''' Public Sub CPlaneElevation(ByVal param As Object) If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return + ManageInterface(False) Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ELEVATION) End Sub @@ -952,6 +953,7 @@ Public Class StartMachPanelVM ''' Public Sub CPlaneOrigin(ByVal param As Object) If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return + ManageInterface(False) Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ORIGIN) End Sub