diff --git a/OptionPanel/DrawOptionPanel/ManageLayerExpander/LayerTreeView.vb b/OptionPanel/DrawOptionPanel/ManageLayerExpander/LayerTreeView.vb index 3014f1a..6c4b7ec 100644 --- a/OptionPanel/DrawOptionPanel/ManageLayerExpander/LayerTreeView.vb +++ b/OptionPanel/DrawOptionPanel/ManageLayerExpander/LayerTreeView.vb @@ -82,20 +82,24 @@ Public Class LayerTreeViewItem End If Dim bOnOffGroup As Boolean = ((Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift) AndAlso Items.Count > 0 If bOnOffGroup Then + EgtEnableCommandLogger() ' abilito/disabilito tutti i nodi del livello sotto di esso (e non oltre) For Each Node In Items Node.m_bOnOff = value ' se abilitato, eseguo operazione If m_SendCmd Then - Map.refProjectVM.SetLastInteger(Node.Id) - If value Then - Map.refProjectVM.ExecuteCommand(Controller.CMD.SHOW) - Else - Map.refProjectVM.ExecuteCommand(Controller.CMD.HIDE) + Dim nStat As Integer + EgtGetStatus(Node.Id, nStat) + If value AndAlso nStat <> GDB_ST.ON_ Then + EgtSetStatus(Node.Id, GDB_ST.ON_) + ElseIf nStat <> GDB_ST.OFF Then + EgtSetStatus(Node.Id, GDB_ST.OFF) End If End If Node.NotifyPropertyChanged(NameOf(OnOff)) Next + EgtDisableCommandLogger() + EgtDraw() End If End If End Set