mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-12 07:56:16 +00:00
Update ArtifactSelectionDialog.java
Fix index out of bounds error
This commit is contained in:
parent
24c68779a7
commit
ba24db42ba
@ -54,7 +54,7 @@ public class ArtifactSelectionDialog extends javax.swing.JDialog {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates new form ArtifactSelectionDialog
|
* Creates new form ArtifactSelectionDialog
|
||||||
*
|
*
|
||||||
* @param parent The parent window
|
* @param parent The parent window
|
||||||
* @param modal Block user-input to other top-level windows.
|
* @param modal Block user-input to other top-level windows.
|
||||||
*/
|
*/
|
||||||
@ -110,9 +110,11 @@ public class ArtifactSelectionDialog extends javax.swing.JDialog {
|
|||||||
@Override
|
@Override
|
||||||
public void mousePressed(MouseEvent evt) {
|
public void mousePressed(MouseEvent evt) {
|
||||||
int index = artifactList.locationToIndex(evt.getPoint());
|
int index = artifactList.locationToIndex(evt.getPoint());
|
||||||
BlackboardArtifact.Type type = model.getElementAt(index);
|
if (index >= 0) {
|
||||||
artifactTypeSelections.put(type, !artifactTypeSelections.get(type));
|
BlackboardArtifact.Type type = model.getElementAt(index);
|
||||||
artifactList.repaint();
|
artifactTypeSelections.put(type, !artifactTypeSelections.get(type));
|
||||||
|
artifactList.repaint();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user