diff --git a/BasicCAT/BasicCAT.b4j.meta b/BasicCAT/BasicCAT.b4j.meta index cc8f255..a363d45 100644 --- a/BasicCAT/BasicCAT.b4j.meta +++ b/BasicCAT/BasicCAT.b4j.meta @@ -238,6 +238,6 @@ ModuleClosedNodes78= ModuleClosedNodes79= ModuleClosedNodes8= ModuleClosedNodes9= -NavigationStack=searchAndReplaceDialog,InTimeRange,100,0,searchAndReplaceDialog,ResultsMap,534,6,searchAndReplaceDialog,resultListView_SelectedIndexChanged,38,0,searchAndReplaceDialog,findButton_Click,44,6,searchAndReplaceDialog,findTextField_TextChanged,506,0,searchAndReplaceDialog,replaceTextField_TextChanged,504,0,searchAndReplaceDialog,CheckShouldShowBasedonExtendedItem,56,0,searchAndReplaceDialog,FilterButton_MouseClicked,529,0,searchAndReplaceDialog,showRegexResult,124,6,searchAndReplaceDialog,showResult,267,6 +NavigationStack=searchAndReplaceDialog,showRegexResult,102,6,searchAndReplaceDialog,Class_Globals,4,0,searchAndReplaceDialog,showResult,355,6,searchAndReplaceDialog,replaceTextField_TextChanged,521,0,searchAndReplaceDialog,findTextField_TextChanged,527,0,searchAndReplaceDialog,GetTimestampButton_MouseClicked,577,0,Visual Designer,searchandreplace.bjl,-100,6,searchAndReplaceDialog,FilterButton_MouseClicked,544,0,searchAndReplaceDialog,replaceSelectedButton_MouseClicked,424,0,searchAndReplaceDialog,resultListView_Action,498,6 SelectedBuild=0 VisibleModules=1,2,3,4,5,6,7,8,9,10,11 diff --git a/BasicCAT/Files/searchandreplace.bjl b/BasicCAT/Files/searchandreplace.bjl index 43d16d0..8e080d4 100644 Binary files a/BasicCAT/Files/searchandreplace.bjl and b/BasicCAT/Files/searchandreplace.bjl differ diff --git a/BasicCAT/searchAndReplaceDialog.bas b/BasicCAT/searchAndReplaceDialog.bas index 07b79a8..9b07618 100644 --- a/BasicCAT/searchAndReplaceDialog.bas +++ b/BasicCAT/searchAndReplaceDialog.bas @@ -503,17 +503,38 @@ Sub replaceAllButton_MouseClicked (EventData As MouseEvent) End Sub Sub resultListView_Action - Dim p As Pane - p=resultListView.Items.Get(resultListView.SelectedIndex) - Dim tagMap As Map - tagMap=p.Tag - Dim filename As String=tagMap.Get("filename") - If filename<>Main.currentProject.currentFilename Then - Main.currentProject.openFile(filename,False) - End If - Main.editorLV.ScrollTo(tagMap.get("index")) - Main.MainForm.AlwaysOnTop=True - Main.MainForm.AlwaysOnTop=False + Dim mi As MenuItem=Sender + Select mi.Text + Case "Preserve only first occurences" + Dim new As List + new.Initialize + Dim map1 As Map + map1.Initialize + For Each p As Pane In resultListView.Items + Dim tagMap As Map + tagMap=p.Tag + Dim source As String + source=Regex.Split(CRLF&"- ",tagMap.Get("text"))(0) + If map1.ContainsKey(source)=False Then + map1.Put(source,"") + new.Add(p) + End If + Next + resultListView.Items.Clear + resultListView.Items.AddAll(new) + Case "Go to the segment" + Dim p As Pane + p=resultListView.Items.Get(resultListView.SelectedIndex) + Dim tagMap As Map + tagMap=p.Tag + Dim filename As String=tagMap.Get("filename") + If filename<>Main.currentProject.currentFilename Then + Main.currentProject.openFile(filename,False) + End If + Main.editorLV.ScrollTo(tagMap.get("index")) + Main.MainForm.AlwaysOnTop=True + Main.MainForm.AlwaysOnTop=False + End Select End Sub Sub searchSourceCheckBox_CheckedChange(Checked As Boolean)