@@ -364,6 +364,11 @@ AppFrame::AppFrame() :
364364
365365 bookmarkSplitter->SplitVertically ( bookmarkView, mainVisSplitter );
366366 mainSplitter->SplitHorizontally ( demodPanel, bookmarkSplitter );
367+
368+ if (!wxGetApp ().getConfig ()->getBookmarksVisible ()) {
369+ bookmarkSplitter->Unsplit (bookmarkView);
370+ bookmarkSplitter->Layout ();
371+ }
367372
368373 vbox->Add (mainSplitter, 1 , wxEXPAND | wxALL, 0 );
369374
@@ -523,6 +528,9 @@ AppFrame::AppFrame() :
523528 themeMenu->AppendRadioItem (wxID_THEME_HD, " HD" )->Check (themeId==COLOR_THEME_HD);
524529
525530 displayMenu->AppendSubMenu (themeMenu, wxT (" &Color Scheme" ));
531+
532+ hideBookmarksItem = displayMenu->AppendCheckItem (wxID_DISPLAY_BOOKMARKS, wxT (" Hide Bookmarks" ));
533+ hideBookmarksItem->Check (!wxGetApp ().getConfig ()->getBookmarksVisible ());
526534
527535 GLFont::setScale ((GLFont::GLFontScale)fontScale);
528536
@@ -1012,6 +1020,9 @@ void AppFrame::OnMenu(wxCommandEvent& event) {
10121020 demodTuner->Refresh ();
10131021 SetTitle (CUBICSDR_TITLE);
10141022 currentSessionFile = " " ;
1023+ bookmarkSplitter->Unsplit (bookmarkView);
1024+ bookmarkSplitter->SplitVertically ( bookmarkView, mainVisSplitter, wxGetApp ().getConfig ()->getBookmarkSplit () );
1025+ hideBookmarksItem->Check (false );
10151026 } else if (event.GetId () == wxID_CLOSE || event.GetId () == wxID_EXIT) {
10161027 Close (false );
10171028 } else if (event.GetId () == wxID_THEME_DEFAULT) {
@@ -1044,6 +1055,14 @@ void AppFrame::OnMenu(wxCommandEvent& event) {
10441055 GLFont::setScale (GLFont::GLFONT_SCALE_LARGE);
10451056 // force all windows refresh
10461057 Refresh ();
1058+ } else if (event.GetId () == wxID_DISPLAY_BOOKMARKS) {
1059+ if (hideBookmarksItem->IsChecked ()) {
1060+ bookmarkSplitter->Unsplit (bookmarkView);
1061+ bookmarkSplitter->Layout ();
1062+ } else {
1063+ bookmarkSplitter->SplitVertically ( bookmarkView, mainVisSplitter, wxGetApp ().getConfig ()->getBookmarkSplit () );
1064+ bookmarkSplitter->Layout ();
1065+ }
10471066 }
10481067
10491068 if (event.GetId () >= wxID_SETTINGS_BASE && event.GetId () < settingsIdMax) {
@@ -1311,7 +1330,8 @@ void AppFrame::OnClose(wxCloseEvent& event) {
13111330 wxGetApp ().getConfig ()->setModemPropsCollapsed (modemProps->isCollapsed ());
13121331 wxGetApp ().getConfig ()->setMainSplit (mainSplitter->GetSashPosition ());
13131332 wxGetApp ().getConfig ()->setVisSplit (mainVisSplitter->GetSashPosition ());
1314- wxGetApp ().getConfig ()->setBookmarkSplit (bookmarkSplitter->GetSashPosition ());
1333+ if (!hideBookmarksItem->IsChecked ()) wxGetApp ().getConfig ()->setBookmarkSplit (bookmarkSplitter->GetSashPosition ());
1334+ wxGetApp ().getConfig ()->setBookmarksVisible (!hideBookmarksItem->IsChecked ());
13151335#ifdef USE_HAMLIB
13161336 wxGetApp ().getConfig ()->setRigEnabled (rigEnableMenuItem->IsChecked ());
13171337 wxGetApp ().getConfig ()->setRigModel (rigModel);
0 commit comments