aboutsummaryrefslogtreecommitdiffstats
path: root/profilers-ui/src/com
diff options
context:
space:
mode:
authorPhil Nguyen <philnguyen@google.com>2021-10-15 15:48:41 -0700
committerPhil Nguyen <philnguyen@google.com>2021-10-18 17:17:24 +0000
commit64e2a17c81935a3db088144d4d215fa4c399ca69 (patch)
tree7f21d853c76f1e422f0dde428820a429a07bfc49 /profilers-ui/src/com
parent35b2bd51937704a3e716de4c18c35d4e16196fc3 (diff)
downloadplatform_tools_adt_idea-64e2a17c81935a3db088144d4d215fa4c399ca69.tar.gz
platform_tools_adt_idea-64e2a17c81935a3db088144d4d215fa4c399ca69.tar.bz2
platform_tools_adt_idea-64e2a17c81935a3db088144d4d215fa4c399ca69.zip
Deselect trace event when clicking outside
This change updates the multi-selection model to update its status as having no active selection when the user clicks outside any event. It also fixes an unrelated bug when we remove a selection that happens to be active. Fixes: 203241979 Test: add new Change-Id: I30c8720e156e0379bc4ac5ad942e73677ff044ab
Diffstat (limited to 'profilers-ui/src/com')
-rw-r--r--profilers-ui/src/com/android/tools/profilers/cpu/CpuThreadTrackRenderer.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/profilers-ui/src/com/android/tools/profilers/cpu/CpuThreadTrackRenderer.java b/profilers-ui/src/com/android/tools/profilers/cpu/CpuThreadTrackRenderer.java
index 7cadbd88d2b..32f37abfab6 100644
--- a/profilers-ui/src/com/android/tools/profilers/cpu/CpuThreadTrackRenderer.java
+++ b/profilers-ui/src/com/android/tools/profilers/cpu/CpuThreadTrackRenderer.java
@@ -131,6 +131,8 @@ public class CpuThreadTrackRenderer implements TrackRenderer<CpuThreadTrackModel
multiSelectionModel.setSelection(
node.getData(),
Collections.singleton(new CaptureNodeAnalysisModel(node, trackModel.getDataModel().getCapture())));
+ } else {
+ multiSelectionModel.deselect();
}
traceEventChart.dispatchEvent(SwingUtil.convertMouseEventPoint(e, p));
}