             return
         }
 
-        currentLayoutIndex = layoutIndex
-        setNeedsReflowWithWindowChange(.unknown)
+        setCurrentLayoutIndex(layoutIndex)
+        setNeedsReflowWithWindowChange(.unknown)
+    }
+
+    private func setCurrentLayoutIndex(_ index: Int, changingSpace: Bool = false) {
+        guard (0..<layouts.count).contains(index) else {
+            return
+        }
+
+        currentLayoutIndex = index
+
+        guard !changingSpace || userConfiguration.enablesLayoutHUDOnSpaceChange() else {
+            return
+        }
+
+        displayLayoutHUD()
     }
 
     func shrinkMainPane() {

    private var layouts: [Layout<Window>] = []
    private var currentLayoutIndexBySpaceIdentifier: [String: Int] = [:]
    private var layoutsBySpaceIdentifier: [String: [Layout<Window>]] = [:]
    private var currentLayoutIndex: Int {
        didSet {
            if !self.changingSpace || userConfiguration.enablesLayoutHUDOnSpaceChange() {
                self.displayLayoutHUD()
            }
        }
    }
    var currentLayout: Layout<Window>? {
        guard !layouts.isEmpty else {
            return nil

                return
            }

            setCurrentLayoutIndex(currentLayoutIndexBySpaceIdentifier[spaceIdentifier] ?? 0, changingSpace: true)

            if let layouts = layoutsBySpaceIdentifier[spaceIdentifier] {
                self.layouts = layouts
