diff --git a/OptionPanel/MachiningOptionPanel/SimulationExpander/SimulationExpanderVM.vb b/OptionPanel/MachiningOptionPanel/SimulationExpander/SimulationExpanderVM.vb index 65994d4..a83b023 100644 --- a/OptionPanel/MachiningOptionPanel/SimulationExpander/SimulationExpanderVM.vb +++ b/OptionPanel/MachiningOptionPanel/SimulationExpander/SimulationExpanderVM.vb @@ -109,7 +109,12 @@ Public Class SimulationExpanderVM .OverwritePrompt = True, .ValidateNames = False} If NewSaveFileDialog.ShowDialog() = Forms.DialogResult.Cancel Then Return - EgtSetInfo(EgtGetCurrMachGroup(), KEY_MCHGRP_NCNAME, NewSaveFileDialog.FileName) + Dim sNcFilePath As String = NewSaveFileDialog.FileName + If sNcFilePath.StartsWith( Path.GetDirectoryName( sCurrFilePath)) Then + EgtSetInfo(EgtGetCurrMachGroup(), KEY_MCHGRP_NCNAME, Path.GetFileName( sNcFilePath)) + Else + EgtSetInfo(EgtGetCurrMachGroup(), KEY_MCHGRP_NCNAME, sNcFilePath) + End If End If ' Recupero la fase corrente