Stop error ledgers from showing tooltip when cleared

This commit is contained in:
mezz committed 2015-11-11 21:21:04 -08:00
1 parent 0251691d66
commit 9247ed1509
2 files changed
+7 -6

No files matched your search

@@ -71,7 +71,7 @@ public class ErrorLedger extends Ledger {
@Override
public String getTooltip() {
if (state == null) {
if (!isVisible()) {
return "";
}
return StringUtil.localize(state.getDescription());
@@ -130,15 +130,16 @@ public class LedgerManager {
yPos += ledger.getHeight();
}
ImmutableSet<IErrorState> errorStates = errorSource.getErrorStates();
List<IErrorState> errorStates = new ArrayList<>(errorSource.getErrorStates());
yPos = 8;
int index = 0;
for (IErrorState errorState : errorStates) {
if (index >= errorLedgers.size()) {
break;
for (ErrorLedger errorLedger : errorLedgers) {
if (index >= errorStates.size()) {
errorLedger.setState(null);
continue;
}
ErrorLedger errorLedger = errorLedgers.get(index++);
IErrorState errorState = errorStates.get(index++);
errorLedger.setState(errorState);
errorLedger.update();