mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 22:52: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:
|
* Contributors:
|
||||||
* Marc Dumais (Ericsson) - Initial API and implementation (Bug 405390)
|
* Marc Dumais (Ericsson) - Initial API and implementation (Bug 405390)
|
||||||
|
* Marc Dumais (Ericsson) - Bug 407673
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.cdt.dsf.gdb.multicorevisualizer.internal.ui.view;
|
package org.eclipse.cdt.dsf.gdb.multicorevisualizer.internal.ui.view;
|
||||||
|
@ -134,9 +135,11 @@ public class MulticoreVisualizerCanvasFilter {
|
||||||
* for all filter objects.
|
* for all filter objects.
|
||||||
*/
|
*/
|
||||||
public void updateFilter() {
|
public void updateFilter() {
|
||||||
if (m_filterList == null)
|
if (m_filterList == null || m_canvas == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
VisualizerModel model = m_canvas.getModel();
|
||||||
|
|
||||||
resetCounters();
|
resetCounters();
|
||||||
m_dynamicFilterList.clear();
|
m_dynamicFilterList.clear();
|
||||||
|
|
||||||
|
@ -147,7 +150,16 @@ public class MulticoreVisualizerCanvasFilter {
|
||||||
addElementToFilterList(elem);
|
addElementToFilterList(elem);
|
||||||
|
|
||||||
// also add all its ancestors
|
// 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) {
|
while (parent != null) {
|
||||||
addElementToFilterList(parent);
|
addElementToFilterList(parent);
|
||||||
parent = parent.getParent();
|
parent = parent.getParent();
|
||||||
|
|
Loading…
Add table
Reference in a new issue