<!--
{
  "availability" : [
    "macOS: 10.12.2 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSScrubberLayout/shouldInvalidateLayoutForSelectionChange",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSScrubberLayout(py)shouldInvalidateLayoutForSelectionChange"
  },
  "title" : "shouldInvalidateLayoutForSelectionChange"
}
-->

# shouldInvalidateLayoutForSelectionChange

Determines whether the scrubber should refresh its layout when the selection changes.

```
var shouldInvalidateLayoutForSelectionChange: Bool { get }
```

## Discussion

If <doc://com.apple.documentation/documentation/Swift/true>, the scrubber invalidates its layout when the selection changes. Subclasses should return <doc://com.apple.documentation/documentation/Swift/true> if the selection index affects the item layout.

The base implementation returns <doc://com.apple.documentation/documentation/Swift/false>.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)