From 5fd85d34938d8db6677242e03db2fa8a4e5d4bb6 Mon Sep 17 00:00:00 2001 From: "Samuel H. Kenyon" Date: Wed, 28 Aug 2013 15:41:08 -0400 Subject: [PATCH] Added workaround to force update of IconView when changing icon size. Also added "thumbnail" text to the drop-down. --- .../corecomponents/DataResultViewerThumbnail.form | 7 +++---- .../corecomponents/DataResultViewerThumbnail.java | 14 ++++++++++---- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/DataResultViewerThumbnail.form b/Core/src/org/sleuthkit/autopsy/corecomponents/DataResultViewerThumbnail.form index 28f3146098..fa43e09733 100644 --- a/Core/src/org/sleuthkit/autopsy/corecomponents/DataResultViewerThumbnail.form +++ b/Core/src/org/sleuthkit/autopsy/corecomponents/DataResultViewerThumbnail.form @@ -203,12 +203,11 @@ - - - + + + - diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/DataResultViewerThumbnail.java b/Core/src/org/sleuthkit/autopsy/corecomponents/DataResultViewerThumbnail.java index 8a2ac90496..a30d206cec 100644 --- a/Core/src/org/sleuthkit/autopsy/corecomponents/DataResultViewerThumbnail.java +++ b/Core/src/org/sleuthkit/autopsy/corecomponents/DataResultViewerThumbnail.java @@ -147,8 +147,7 @@ public final class DataResultViewerThumbnail extends AbstractDataResultViewer { } }); - thumbnailSizeComboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Small", "Medium", "Large" })); - thumbnailSizeComboBox.setSelectedIndex(1); + thumbnailSizeComboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Small Thumbnails", "Medium Thumbnails", "Large Thumbnails" })); thumbnailSizeComboBox.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { thumbnailSizeComboBoxActionPerformed(evt); @@ -241,8 +240,15 @@ public final class DataResultViewerThumbnail extends AbstractDataResultViewer { ThumbnailViewNode tn = (ThumbnailViewNode) node; tn.setRefresh(true); } - } - + } + + // Temporarily set the explored context to the root, instead of a child node. + // This is a workaround hack to convince org.openide.explorer.ExplorerManager to + // update even though the new and old Node values are identical. This in turn + // will cause the entire view to update completely. After this we + // immediately set the node back to the current child by calling switchPage(). + em.setExploredContext(root); + switchPage(); }//GEN-LAST:event_thumbnailSizeComboBoxActionPerformed // Variables declaration - do not modify//GEN-BEGIN:variables