Skip to content

Commit 882de25

Browse files
committed
Avoid multiple calls to isIdleEvent when checking if EMO should be displayed
The result of getEntry is sufficient to determine if an EMO is an idle event, so use that instead of making an additional call to isIdleEvent.
1 parent 039d465 commit 882de25

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/projections/Tools/Timeline/EntryMethodObject.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -798,13 +798,14 @@ public boolean isUnaccountedTime(){
798798

799799
/** Whether this object is displayed or hidden (for example when idle's are not displayed this might be false) */
800800
public boolean isDisplayed() {
801+
final int entry = getEntry();
801802
// If it is hidden, we may not display it
802-
if(data.entryIsHiddenID(getEntry())) {
803+
if(data.entryIsHiddenID(entry)) {
803804
return false;
804805
}
805806

806807
// If this is an idle time region, we may not display it
807-
if (isIdleEvent() && (!data.showIdle() || MainWindow.IGNORE_IDLE)) {
808+
if (entry == Analysis.IDLE_ENTRY_POINT && (!data.showIdle() || MainWindow.IGNORE_IDLE)) {
808809
return false;
809810
}
810811

0 commit comments

Comments
 (0)