mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-12 16:06:15 +00:00
fixed a bug where single intercase search would stay selected after it was selected once and then changed back to any intercase
This commit is contained in:
parent
bf2d2be90d
commit
1a08c871c7
@ -42,6 +42,10 @@ public class InterCasePanel extends javax.swing.JPanel {
|
|||||||
|
|
||||||
private String errorMessage;
|
private String errorMessage;
|
||||||
|
|
||||||
|
//True if we are looking in any or all cases,
|
||||||
|
// false if we must find matches in a given case plus the current case
|
||||||
|
private boolean anyCase;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates new form InterCasePanel
|
* Creates new form InterCasePanel
|
||||||
*/
|
*/
|
||||||
@ -49,6 +53,7 @@ public class InterCasePanel extends javax.swing.JPanel {
|
|||||||
initComponents();
|
initComponents();
|
||||||
this.errorMessage = "";
|
this.errorMessage = "";
|
||||||
this.caseMap = new HashMap<>();
|
this.caseMap = new HashMap<>();
|
||||||
|
this.anyCase = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void specificCaseSelected(boolean selected) {
|
private void specificCaseSelected(boolean selected) {
|
||||||
@ -127,10 +132,12 @@ public class InterCasePanel extends javax.swing.JPanel {
|
|||||||
if(this.caseComboBox.isEnabled() && this.caseComboBox.getSelectedItem() == null){
|
if(this.caseComboBox.isEnabled() && this.caseComboBox.getSelectedItem() == null){
|
||||||
this.caseComboBox.setSelectedIndex(0);
|
this.caseComboBox.setSelectedIndex(0);
|
||||||
}
|
}
|
||||||
|
this.anyCase = false;
|
||||||
}//GEN-LAST:event_specificCentralRepoCaseRadioActionPerformed
|
}//GEN-LAST:event_specificCentralRepoCaseRadioActionPerformed
|
||||||
|
|
||||||
private void anyCentralRepoCaseRadioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_anyCentralRepoCaseRadioActionPerformed
|
private void anyCentralRepoCaseRadioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_anyCentralRepoCaseRadioActionPerformed
|
||||||
this.caseComboBox.setEnabled(false);
|
this.caseComboBox.setEnabled(false);
|
||||||
|
this.anyCase = true;
|
||||||
}//GEN-LAST:event_anyCentralRepoCaseRadioActionPerformed
|
}//GEN-LAST:event_anyCentralRepoCaseRadioActionPerformed
|
||||||
|
|
||||||
|
|
||||||
@ -170,6 +177,10 @@ public class InterCasePanel extends javax.swing.JPanel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Integer getSelectedCaseId(){
|
Integer getSelectedCaseId(){
|
||||||
|
if(this.anyCase){
|
||||||
|
return InterCasePanel.NO_CASE_SELECTED;
|
||||||
|
}
|
||||||
|
|
||||||
for(Entry<Integer, String> entry : this.caseMap.entrySet()){
|
for(Entry<Integer, String> entry : this.caseMap.entrySet()){
|
||||||
if(entry.getValue().equals(this.caseComboBox.getSelectedItem())){
|
if(entry.getValue().equals(this.caseComboBox.getSelectedItem())){
|
||||||
return entry.getKey();
|
return entry.getKey();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user