From 158c0436750868895382e5db1c2c406effb44f27 Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Fri, 11 Dec 2020 11:43:34 +0100 Subject: [PATCH] Reload Indicies when ObjectType changes --- Global_Indexer/frmAdministration.vb | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Global_Indexer/frmAdministration.vb b/Global_Indexer/frmAdministration.vb index 58a577b..89826ff 100644 --- a/Global_Indexer/frmAdministration.vb +++ b/Global_Indexer/frmAdministration.vb @@ -9,6 +9,8 @@ Public Class frmAdministration Private SourceAttributes As List(Of String) Private SourceObjectTypes As List(Of String) + Private Current_ObjectType As String = "" + Private GroupToDelete As Integer = Nothing Private IsInsert As Boolean = False Dim frmloaded As Boolean = False @@ -300,6 +302,8 @@ Public Class frmAdministration Private Sub OBJEKTTYPComboBox_SelectedIndexChanged(sender As Object, e As EventArgs) Handles OBJEKTTYPComboBox.SelectedIndexChanged If WINDREAM_DIRECTCheckBox.Checked = True Then load_WDIndices() + + Current_ObjectType = OBJEKTTYPComboBox.Text End If End Sub Sub load_WDIndices() @@ -309,14 +313,14 @@ Public Class frmAdministration Me.WD_INDEXComboBox.Items.Add("") Me.INDEXNAME_AutoIndexCMB.Items.Clear() - If SourceAttributes Is Nothing Then + If SourceAttributes Is Nothing Or Current_ObjectType <> OBJEKTTYPComboBox.Text Then SourceAttributes = WINDREAM.GetIndiciesByObjecttype(OBJEKTTYPComboBox.Text) End If If SourceAttributes IsNot Nothing Then - For Each index As String In SourceAttributes - Me.WD_INDEXComboBox.Items.Add(index) - INDEXNAME_AutoIndexCMB.Items.Add(index) + For Each oIndex As String In SourceAttributes + Me.WD_INDEXComboBox.Items.Add(oIndex) + INDEXNAME_AutoIndexCMB.Items.Add(oIndex) Next End If End If