Merge pull request #7053 from wschaeferB/7655-ClearTextContentViewer

7655 don't set stale data for disabled viewer
This commit is contained in:
Richard Cordovano 2021-06-18 11:49:58 -04:00 committed by GitHub
commit 068435a47b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,7 +1,7 @@
/* /*
* Autopsy Forensic Browser * Autopsy Forensic Browser
* *
* Copyright 2019 Basis Technology Corp. * Copyright 2019-2021 Basis Technology Corp.
* Contact: carrier <at> sleuthkit <dot> org * Contact: carrier <at> sleuthkit <dot> org
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
@ -79,9 +79,9 @@ public class TextContentViewerPanel extends javax.swing.JPanel implements DataCo
} }
/** /**
* Determine whether the content viewer which displays this panel isSupported. * Determine whether the content viewer which displays this panel
* This panel is supported if any of the TextViewer's displayed in it are * isSupported. This panel is supported if any of the TextViewer's displayed
* supported. * in it are supported.
* *
* @param node * @param node
* *
@ -213,7 +213,7 @@ public class TextContentViewerPanel extends javax.swing.JPanel implements DataCo
// Get and set current selected tab // Get and set current selected tab
int currentTab = pane.getSelectedIndex(); int currentTab = pane.getSelectedIndex();
if (currentTab != -1) { if (currentTab != -1 && pane.isEnabledAt(currentTab)) {
UpdateWrapper dcv = textViewers.get(currentTab); UpdateWrapper dcv = textViewers.get(currentTab);
if (dcv.isOutdated()) { if (dcv.isOutdated()) {
// change the cursor to "waiting cursor" for this operation // change the cursor to "waiting cursor" for this operation