Migliorata gestione evidenziazione compo

This commit is contained in:
Nicola Pievani
2024-11-25 15:39:26 +01:00
parent 8006b66a01
commit 5d32bb9ddf
2 changed files with 12 additions and 10 deletions
+4 -4
View File
@@ -1535,7 +1535,7 @@ Public Class Part
' ontengo la posizione prevista nella grafica
Dim IndexInList As Integer = DdfFile.GetIndexInList(TempList, m_SelCompo)
' recupero la lista ordinata
Dim sCompoName As String = m_SelCompo.SelFile
Dim sCompoName As String = m_SelCompo.TemplateSelItem
' recupero il primo part disponibile
Dim nIdFirstPart As Integer = EgtGetFirstPart()
Dim nIdLay As Integer = EgtGetFirstLayer(nIdFirstPart)
@@ -1543,12 +1543,12 @@ Public Class Part
While nIdLay <> GDB_ID.NULL
Dim sInfoPath As String = String.Empty
If EgtGetInfo(nIdLay, "Path", sInfoPath) Then
Dim sNamePath As String = Path.GetFileNameWithoutExtension(sInfoPath)
If sNamePath = sCompoName And IndexLay = IndexInList Then
Dim sNamePath As String = sInfoPath
If sNamePath.Contains(sCompoName) And IndexLay = IndexInList Then
EgtSetMark(nIdLay)
m_SelCompo.SetMark()
Exit While
ElseIf sNamePath = sCompoName And IndexLay < IndexInList Then
ElseIf sNamePath.Contains(sCompoName) And IndexLay < IndexInList Then
IndexLay = IndexLay + 1
End If
End If
+8 -6
View File
@@ -485,21 +485,23 @@ Public Class SceneManagerVM
' ottengo la posizione prevista nella grafica
Dim IndexInList As Integer = DdfFile.GetIndexInList(TempList, CurrCompo)
' recupero la lista ordinata
Dim sCompoName As String = CurrCompo.SelFile
Dim sCompoName As String = CurrCompo.TemplateSelItem
' oridnamento del layer
Dim IndexLay As Integer = -1
' recupero il nome della comaponente selezionata con MouseOver
Dim sInfoPath As String = String.Empty
If Not EgtGetInfo(nIdLay, "Path", sInfoPath) Then Return True
Dim sNamePath As String = Path.GetFileNameWithoutExtension(sInfoPath)
If sNamePath = sCompoName Then
' Dim sNamePath As String = Path.GetFileNameWithoutExtension(sInfoPath)
Dim sNamePath As String = sInfoPath
'If sNamePath = sCompoName Then
If sNamePath.Contains(sCompoName) Then
Dim nCurrLayId As Integer = nIdLay
Dim nCounter As Integer = 1
While nCurrLayId <> GDB_ID.NULL
nCurrLayId = EgtGetNext(nCurrLayId)
Dim LocalsPath As String = String.Empty
If EgtGetInfo(nCurrLayId, "Path", LocalsPath) Then
If sNamePath = Path.GetFileNameWithoutExtension(LocalsPath) Then
If sNamePath.Trim = LocalsPath.Trim Then
nCounter += 1
End If
End If
@@ -511,7 +513,7 @@ Public Class SceneManagerVM
While IndexInList < TempList.Count And nIdLay <> GDB_ID.NULL
' recupero l'ordinamento del layer
If sNamePath = sCompoName And IndexLay = IndexInList Then
If sNamePath.Contains(sCompoName) And IndexLay = IndexInList Then
EgtSetMark(nIdLay)
' evidenzio la compo corrente
TempList(IndexInList).SetMark()
@@ -519,7 +521,7 @@ Public Class SceneManagerVM
' ricerca terminata correttamente
Return True
Exit While
ElseIf sNamePath = sCompoName And IndexInList < IndexLay Then
ElseIf sNamePath.Contains(sCompoName) And IndexInList < IndexLay Then
IndexInList += 1
Else
Return False