summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorDaniel Megert2012-01-18 09:33:43 (EST)
committer Daniel Megert2012-01-18 09:33:43 (EST)
commitcfb15dc827102d5c0cc7ca75ac133277cdcfbc5d (patch)
tree68eb0f0568699a687e1e29a1fd20bdcdc9ba352b
parentdf6123073e6cfe8b9de42ffb68d365e6b6d755ab (diff)
downloadegit-cfb15dc827102d5c0cc7ca75ac133277cdcfbc5d.zip
egit-cfb15dc827102d5c0cc7ca75ac133277cdcfbc5d.tar.gz
egit-cfb15dc827102d5c0cc7ca75ac133277cdcfbc5d.tar.bz2
Fix possible invalid thread access exception in history pagerefs/changes/67/4967/3
The fix ensures that the table is only refreshed when the UI property really changed. Bug 368804 Change-Id: Id04c1f870f8c577b1cd81168c0c1771647c73811 Signed-off-by: Daniel Megert <daniel_megert@ch.ibm.com>
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/GitHistoryPage.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/GitHistoryPage.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/GitHistoryPage.java
index 84b5d8d..b2080e3 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/GitHistoryPage.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/GitHistoryPage.java
@@ -597,10 +597,14 @@ public class GitHistoryPage extends HistoryPage implements RefsChangedListener {
private final IPropertyChangeListener listener = new IPropertyChangeListener() {
public void propertyChange(PropertyChangeEvent event) {
if (UIPreferences.RESOURCEHISTORY_SHOW_RELATIVE_DATE.equals(event
- .getProperty()))
- graph.setRelativeDate(isShowingRelativeDates());
- graph.getTableView().refresh();
+ .getProperty())) {
+ Object oldValue = event.getOldValue();
+ if (oldValue == null || !oldValue.equals(event.getNewValue())) {
+ graph.setRelativeDate(isShowingRelativeDates());
+ graph.getTableView().refresh();
+ }
}
+ }
};
/**