Skip to content

Commit

Permalink
Merge pull request #548 from drowe67/ms-restore-active-tab
Browse files Browse the repository at this point in the history
Fix bug preventing proper restore of selected tabs.
  • Loading branch information
tmiw authored Sep 21, 2023
2 parents a5edd04 + ca65e0c commit b2a0908
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
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

0 comments on commit b2a0908

Please sign in to comment.