void (TabInfo oldSelection, TabInfo newSelection) { if (oldSelection != null && !isStateBeingRestored()) { final GridImpl grid = getGridFor(oldSelection); if (grid != null && getTabFor(grid) != null) { grid.saveUiState(); } } }