void (TreeModel newModel) { var expandMeasurer = this.expandMeasurer; if (expandMeasurer != null) { expandMeasurer.detach(); // The entire model has changed, that expansion is not going to happen. } super.setModel(newModel); }