mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 14:42:11 +02:00
Bug 407673 - [visualizer] canvas filter on thread: sometimes wrongly
hides thread Change-Id: I85c0d9d0c8f5200190da450fadcf1d232d043528 Reviewed-on: https://git.eclipse.org/r/12692 Reviewed-by: Marc Khouzam <marc.khouzam@ericsson.com> IP-Clean: Marc Khouzam <marc.khouzam@ericsson.com> Tested-by: Marc Khouzam <marc.khouzam@ericsson.com>
This commit is contained in:
parent
b7969ba527
commit
e8cb904f9c
1 changed files with 14 additions and 2 deletions
|
@ -7,6 +7,7 @@
|
|||
*
|
||||
* Contributors:
|
||||
* Marc Dumais (Ericsson) - Initial API and implementation (Bug 405390)
|
||||
* Marc Dumais (Ericsson) - Bug 407673
|
||||
*******************************************************************************/
|
||||
|
||||
package org.eclipse.cdt.dsf.gdb.multicorevisualizer.internal.ui.view;
|
||||
|
@ -134,9 +135,11 @@ public class MulticoreVisualizerCanvasFilter {
|
|||
* for all filter objects.
|
||||
*/
|
||||
public void updateFilter() {
|
||||
if (m_filterList == null)
|
||||
if (m_filterList == null || m_canvas == null)
|
||||
return;
|
||||
|
||||
VisualizerModel model = m_canvas.getModel();
|
||||
|
||||
resetCounters();
|
||||
m_dynamicFilterList.clear();
|
||||
|
||||
|
@ -147,7 +150,16 @@ public class MulticoreVisualizerCanvasFilter {
|
|||
addElementToFilterList(elem);
|
||||
|
||||
// also add all its ancestors
|
||||
IVisualizerModelObject parent = elem.getParent();
|
||||
IVisualizerModelObject parent;
|
||||
|
||||
// Bug 407673 - if element is a thread, lookup the parent (core)
|
||||
// from the current model, to be sure it's up-to-date
|
||||
if (elem instanceof VisualizerThread && model != null) {
|
||||
parent = model.getThread(((VisualizerThread) elem).getGDBTID()).getParent();
|
||||
}
|
||||
else {
|
||||
parent = elem.getParent();
|
||||
}
|
||||
while (parent != null) {
|
||||
addElementToFilterList(parent);
|
||||
parent = parent.getParent();
|
||||
|
|
Loading…
Add table
Reference in a new issue