Skip to content

Commit 3639316

Browse files
committed
Refine condition how function painter searched (#125)
Make search more specific. When type and name are specified, match both.
1 parent 555fd96 commit 3639316

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

scripts/JSRootPainter.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2594,10 +2594,10 @@
25942594
if (!pobj) continue;
25952595

25962596
if (selobj && (pobj === selobj)) return painters[n];
2597-
2598-
if (selname && (pobj.fName === selname)) return painters[n];
2599-
2600-
if (seltype && (pobj._typename === seltype)) return painters[n];
2597+
if (!selname && !seltype) continue;
2598+
if (selname && (pobj.fName !== selname)) continue;
2599+
if (seltype && (pobj._typename !== seltype)) continue;
2600+
return painters[n];
26012601
}
26022602

26032603
return null;

0 commit comments

Comments
 (0)