diff --git a/Assembly/Assembly.vb b/Assembly/Assembly.vb index 86b8456..4c587b9 100644 --- a/Assembly/Assembly.vb +++ b/Assembly/Assembly.vb @@ -258,7 +258,7 @@ Public Class Assembly Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.IsModified = True HeightJamb() SetWidthJamb() - 'HingeRabbetJamb() + HingeRabbetJamb() 'BottomRabbetJamb() UpDateAllCompo() End Set diff --git a/DoorParameters/Part.vb b/DoorParameters/Part.vb index 41f42ad..77460ec 100644 --- a/DoorParameters/Part.vb +++ b/DoorParameters/Part.vb @@ -2821,7 +2821,7 @@ Public Class Part Else While IndexParam < CompoTemplateItem.CompoParamList.Count ' il parametro seguente non appartiene a nessuna componente - If GetKey(FileContent(IndexLine)) = K_OTHERDOOR Then + If IndexLine < FileContent.Count AndAlso GetKey(FileContent(IndexLine)) = K_OTHERDOOR Then CompoTemplateItem.OtherDoor = True IndexLine += 1 Continue While diff --git a/OptionsWindow/OptionModule.vb b/OptionsWindow/OptionModule.vb index 87167b9..59bee62 100644 --- a/OptionsWindow/OptionModule.vb +++ b/OptionsWindow/OptionModule.vb @@ -212,10 +212,6 @@ Friend Module OptionModule m_ConfigurationSoftware = ConfigType.Door End If - m_DisableWindowOrder = (GetMainPrivateProfileInt(S_GENERAL, "DisableOrder", 0) <> 0) - - m_DisableTemplate = (GetMainPrivateProfileInt(S_GENERAL, "DisableTemplate", 0) <> 0) - ' imposto unità di misura per interfaccia utente m_bIsMmUnit = (GetMainPrivateProfileInt(S_SCENE, K_MMUNITS, 1) <> 0) EgtSetUiUnits(m_bIsMmUnit) @@ -287,6 +283,10 @@ Friend Module OptionModule m_SmartHelp = HelpPage.WebBrowserVB End Select + m_DisableWindowOrder = (GetMainPrivateProfileInt(S_GENERAL, "DisableOrder", 0) <> 0) + + m_DisableTemplate = (GetMainPrivateProfileInt(S_GENERAL, "DisableTemplate", 0) <> 0) + m_DisableHM = (GetMainPrivateProfileInt(S_GENERAL, K_DISABLEHM, 1) = 0) m_DisableDeleteCommandHM = (GetMainPrivateProfileInt(S_GENERAL, K_DISABLEDELETECOMMANDHM, 1) = 0) diff --git a/OptionsWindow/OptionsV.xaml b/OptionsWindow/OptionsV.xaml index 93f5fe8..718d51d 100644 --- a/OptionsWindow/OptionsV.xaml +++ b/OptionsWindow/OptionsV.xaml @@ -686,7 +686,6 @@ Grid.Column="0"/> diff --git a/OptionsWindow/OptionsViewModel.vb b/OptionsWindow/OptionsViewModel.vb index 73f8c7a..cf664a8 100644 --- a/OptionsWindow/OptionsViewModel.vb +++ b/OptionsWindow/OptionsViewModel.vb @@ -1629,9 +1629,9 @@ Public Class OptionsVM Set(value As Boolean) m_EnableTemplate = value If Not value Then - DefaultWritePrivateProfileString(S_EDGE, "DisableTemplate", "1") + WriteMainPrivateProfileString(S_GENERAL, "DisableTemplate", "1") Else - DefaultWritePrivateProfileString(S_EDGE, "DisableTemplate", "0") + WriteMainPrivateProfileString(S_GENERAL, "DisableTemplate", "0") End If OptionModule.m_DisableTemplate = Not value NotifyPropertyChanged("EnableTemplate") @@ -1646,9 +1646,9 @@ Public Class OptionsVM Set(value As Boolean) m_EnableOrder = value If Not value Then - DefaultWritePrivateProfileString(S_EDGE, "DisableOrder", "1") + WriteMainPrivateProfileString(S_GENERAL, "DisableOrder", "1") Else - DefaultWritePrivateProfileString(S_EDGE, "DisableOrder", "0") + WriteMainPrivateProfileString(S_GENERAL, "DisableOrder", "0") End If OptionModule.m_DisableWindowOrder = Not value NotifyPropertyChanged("EnableOrder")