Migliorata gestione SetMark per componenti con stesso Brand/File

This commit is contained in:
Nicola Pievani
2025-04-09 16:36:33 +02:00
parent 5aa4d596d8
commit d73000bdd7
2 changed files with 6 additions and 2 deletions
+3 -1
View File
@@ -1537,6 +1537,8 @@ Public Class Part
DdfFile.GetOrderedListSameCompo(TempList)
' ontengo la posizione prevista nella grafica
Dim IndexInList As Integer = DdfFile.GetIndexInList(TempList, m_SelCompo)
' recupero il direttorio della componente
Dim sDirCompo As String = Path.GetFileName(m_SelCompo.CompoType.Path)
' recupero la lista ordinata
Dim sCompoName As String = m_SelCompo.TemplateSelItem
' recupero il primo part disponibile
@@ -1547,7 +1549,7 @@ Public Class Part
Dim sInfoPath As String = String.Empty
If EgtGetInfo(nIdLay, "Path", sInfoPath) Then
Dim sNamePath As String = sInfoPath
If sNamePath.Contains(sCompoName) And IndexLay = IndexInList Then
If sNamePath.Contains(sCompoName) And sNamePath.Contains(sDirCompo) And IndexLay = IndexInList Then
EgtSetMark(nIdLay)
m_SelCompo.SetMark()
Exit While
+3 -1
View File
@@ -492,6 +492,8 @@ Public Class SceneManagerVM
DdfFile.GetOrderedListSameCompo(TempList)
' ottengo la posizione prevista nella grafica
Dim IndexInList As Integer = DdfFile.GetIndexInList(TempList, CurrCompo)
' recupero il direttorio della componente
Dim sDirCompo As String = Path.GetFileName(CurrCompo.CompoType.Path)
' recupero la lista ordinata
Dim sCompoName As String = CurrCompo.TemplateSelItem
' oridnamento del layer
@@ -502,7 +504,7 @@ Public Class SceneManagerVM
' Dim sNamePath As String = Path.GetFileNameWithoutExtension(sInfoPath)
Dim sNamePath As String = sInfoPath
'If sNamePath = sCompoName Then
If sNamePath.Contains(sCompoName) Then
If sNamePath.Contains(sCompoName) And sNamePath.Contains(sDirCompo) Then
Dim nCurrLayId As Integer = nIdLay
Dim nCounter As Integer = 1
While nCurrLayId <> GDB_ID.NULL