EgtCAM5 :

- Migliorie varie.
This commit is contained in:
Emmanuele Sassi
2016-07-14 20:04:44 +00:00
parent f359364b91
commit d88d8f5b10
4 changed files with 43 additions and 34 deletions
+5 -2
View File
@@ -378,6 +378,7 @@ Namespace EgtCAM5
NewToolItem = New ToolTreeViewItem(NewName)
ToolFamily.Items.Add(NewToolItem)
EgtTdbSaveCurrTool()
NewToolItem.NewTool = True
NewToolItem.IsSelected = True
NewToolItem.NotifyPropertyChanged("IsSelected")
Exit For
@@ -427,6 +428,7 @@ Namespace EgtCAM5
Application.Msn.NotifyColleagues(Application.SAVETOOLDRAW)
EgtTdbSaveCurrTool()
EgtTdbSave()
DirectCast(param, ToolTreeViewItem).NewTool = False
End Sub
''' <summary>
@@ -434,9 +436,10 @@ Namespace EgtCAM5
''' </summary>
Private Function CanSave(ByVal param As Object) As Boolean
' Verifico che sia selezionato un utensile
If TypeOf param Is MachiningTreeViewItem Then
If TypeOf param Is ToolTreeViewItem Then
Dim Tool As ToolTreeViewItem = DirectCast(param, ToolTreeViewItem)
' Verifico che i parametri dell'utensile siano validi
Return DirectCast(param, MachiningTreeViewItem).IsValid And EgtTdbIsCurrToolModified()
Return (Tool.IsValid And EgtTdbIsCurrToolModified()) Or Tool.NewTool
Else
Return False
End If