Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug preventing proper restore of selected tabs. #548

Merged
merged 2 commits into from
Sep 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions USER_MANUAL.md
Original file line number Diff line number Diff line change
Expand Up @@ -917,6 +917,7 @@ LDPC | Low Density Parity Check Codes - a family of powerful FEC codes
1. Bugfixes:
* FreeDV Reporter: Fix regression preventing proper display of "RX Only" stations. (PR #542)
* Default to the audio from the current TX mode if no modes decode (works around Codec2 bug with 1600 mode). (PR #544)
* Fix bug preventing proper restore of selected tabs. (PR #548)
2. Enhancements:
* Add configuration for background/foreground colors in FreeDV Reporter. (PR #545)
* Always connect to FreeDV Reporter (in view only mode if necessary), regardless of valid configuration. (PR #542, #547)
Expand Down
4 changes: 3 additions & 1 deletion src/topFrame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@ bool TabFreeAuiNotebook::LoadPerspective(const wxString& layout) {

// Get list of tab id's and move them to pane
wxString tab_list = tab_part.AfterFirst(wxT('='));
size_t activePage = -1;
while(1) {
wxString tab = tab_list.BeforeFirst(wxT(','));
if (tab.empty()) break;
Expand All @@ -284,9 +285,10 @@ bool TabFreeAuiNotebook::LoadPerspective(const wxString& layout) {
const size_t newpage_idx = dest_tabs->GetPageCount();
dest_tabs->InsertPage(page.window, page, newpage_idx);

if (c == wxT('+')) dest_tabs->SetActivePage(newpage_idx);
if (c == wxT('+')) activePage = newpage_idx;
else if ( c == wxT('*')) sel_page = tab_idx;
}
if (activePage >= 0) dest_tabs->SetActivePage(activePage);
dest_tabs->DoShowHide();

tabs = tabs.AfterFirst(wxT('|'));
Expand Down