Sacrico tutti i pezzi da tavola ausiliaria

This commit is contained in:
NicolaP
2022-09-21 18:56:49 +02:00
parent ab525c7431
commit 9c60ef020f
+17 -6
View File
@@ -895,7 +895,7 @@ Public Class MoveRawPartPage
Private Sub PauseBtn_Click(sender As Object, e As RoutedEventArgs) Handles PauseBtn.Click
' verifico che ci sia un elemto selezionato
Dim nRawIdSlected As Integer = EgtGetFirstSelectedObj()
If nRawIdSlected = GDB_ID.NULL Then Return
'If nRawIdSlected = GDB_ID.NULL Then Return
If m_RawMoveDataList.Count = 0 Then Return
@@ -914,12 +914,23 @@ Public Class MoveRawPartPage
' Eseguo eventuali spezzature dei grezzi e vi sposto i pezzi (i grezzi devono essere sempre copiati per Registrazione con rotazione)
Dim nRawId As Integer = EgtGetFirstRawPart()
While nRawId <> GDB_ID.NULL
'' se il grezzo è presente nella fase precedente e non è quello selezionato allora procedo a creare una copia nella nuova fase
'If EgtVerifyRawPartPhase(nRawId, nNewPhase - 1) And nRawId <> nRawIdSlected Then
' EgtKeepRawPart(nRawId, nNewPhase - 1)
'End If
' se il grezzo è presente nella fase precedente e non è quello selezionato allora procedo a creare una copia nella nuova fase
For Each RawOnAuxTabData As RawMoveData In m_RawMoveDataList
If EgtVerifyRawPartPhase(nRawId, nNewPhase - 1) And nRawId <> RawOnAuxTabData.m_nId Then
EgtKeepRawPart(nRawId, nNewPhase - 1)
End If
Next
If EgtVerifyRawPartPhase(nRawId, nNewPhase - 1) Then
Dim bKeepRawPart As Boolean = True
For Each RawOnAuxTabData As RawMoveData In m_RawMoveDataList
If nRawId = RawOnAuxTabData.m_nId Then
bKeepRawPart = False
Exit For
End If
Next
If bKeepRawPart Then EgtKeepRawPart(nRawId, nNewPhase - 1)
End If
' passo al successivo grezzo
nRawId = EgtGetNextRawPart(nRawId)
End While