Update profile selection logic and cleanup comments

Removed check preventing reload of selected profile in frmDIProfilEigenschaften.vb, always loading the chosen profile and updating _pos accordingly. Also cleaned up comments and formatting in frmNIProfileigenschaften.vb.
This commit is contained in:
OlgunR
2026-04-02 15:36:14 +02:00
parent ee2f0bd102
commit 5414e89189
2 changed files with 6 additions and 4 deletions

View File

@@ -237,9 +237,7 @@ Public Class frmDIProfilEigenschaften
Private Sub cmbProfilauswahl_DropDownItemClicked(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ToolStripItemClickedEventArgs) Handles cmbProfilauswahl.DropDownItemClicked
' wenn bereits ein Profil ausgewählt wurde
If Me.selectedProfile IsNot Nothing Then
' wenn es sich bei dem ausgewählten Element um das gleiche handelt wie das Aktive, dann nichts tun
If e.ClickedItem.Text = Me.selectedProfile.Profilname Then Exit Sub
If selectedProfile.HasChanges Then
@@ -251,7 +249,11 @@ Public Class frmDIProfilEigenschaften
'Dim changeProfile As Boolean = Me.AskToSaveIfNeccessary(False)
Lade_Profil(e.ClickedItem.Text)
For i = 0 To arrProfile.GetUpperBound(0)
If arrProfile(i, 0) = e.ClickedItem.Text Then
_pos = arrProfile(i, 1)
End If
Next
End Sub

View File

@@ -522,7 +522,7 @@ Public Class frmNIProfileigenschaften
Private Sub cmbProfilauswahl_DropDownItemClicked(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ToolStripItemClickedEventArgs) Handles cmbProfilauswahl.DropDownItemClicked
' wenn bereits ein Profil ausgewählt wurde
If Me._selectedProfile IsNot Nothing Then
Me.cmbIndexValidierung.SelectedIndex = -1
If _selectedProfile.HasChanges Then