Floating state persistence + insertChildWidget guard#2065
Merged
ten9876 merged 1 commit intoApr 27, 2026
Conversation
- [fix] Floating panadapter and applet state not restored across restarts - ContainerWidget::insertChildWidget — no-op for already-present children
This was referenced Apr 27, 2026
ten9876
added a commit
that referenced
this pull request
Apr 27, 2026
…2067) Originally by @chibondking — propagates View → Frameless Window setting to all popped-out panadapters and applet containers, instead of leaving them with hardcoded Qt::FramelessWindowHint. - PanFloatingWindow / FloatingContainerWindow constructors now read AppSettings["FramelessWindow"] instead of hardcoding the flag. - New setFramelessMode(bool) on both window classes flips the flag at runtime, preserving geometry + visibility. - PanadapterStack::setFramelessMode and ContainerManager::setFramelessMode iterate live floating windows and propagate the toggle. - MainWindow::setFramelessWindow calls into both managers. Resolved one trivial conflict in PanadapterStack.h where the new setFramelessMode declaration overlapped with the saveFloatingState/ restoreFloatingState block from #2065. Closes #2059. Co-authored-by: CJ Johnson <cj@cedrick.io> Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This was referenced Apr 27, 2026
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Combines two changes:
1. Cherry-picked persistence fix (originally #2057, by @chibondking)
PanadapterStack::saveFloatingState/restoreFloatingStatefor popped-out panadapters andContainerManager::saveState()inprepareShutdownfor popped-out applet containers, plusMainWindowcalls to restore both at launch. PR #2057 was based on a stale main; cherry-picked the four-file diff onto current main and verified clean.2.
ContainerWidget::insertChildWidgetguardWhile testing #1 on top of current main, the Aetherial Audio container's CHAIN widget displaced from index 0 down to the bottom of the layout. Root cause:
ContainerManager::saveState()skips non-ContainerWidgetchildren (line 337qobject_cast<ContainerWidget*>(w)), soClientChainApplet(a plain QWidget) is silently omitted from the saved children list. ThenrestoreState()'s second pass callsinsertChildWidget(i, child)for each saved child at indices 0..N-1; Qt'sinsertWidgeton a widget already in the layout moves it, shifting CHAIN further down each iteration.Fix:
insertChildWidgetno-ops when the child is already in this layout. AppletPanel populates children once at construction; restoreState's re-add was the bug. Drag-reorder of chain stages is unaffected because that path doesremoveChildWidgetfirst.Closes #2057
Closing in favour of this combined PR. Thanks @chibondking for the persistence work — the cherry-pick applied cleanly and your design is solid; we just hit a latent bug in the existing ContainerManager API that #2057 was the first thing to exercise.
Co-Authored-By: CJ Johnson cj@cedrick.io