MCPcopy Create free account
hub / github.com/audacity/audacity / UpdateDisplay

Method UpdateDisplay

src/BatchProcessDialog.cpp:781–819  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

779}
780
781void MacrosWindow::UpdateDisplay( bool bExpanded )
782{
783 // If we failed to save changes, we abandon the attempt to
784 // change the expand/shrink state of the GUI.
785 if( !SaveChanges() )
786 return;
787
788 mbExpanded = bExpanded;
789
790 mChanged = false;
791 // if we try to access the about to be destroyed mSave button
792 // inappropriately, we need to crash rather than (sometimes) silently
793 // succeed.
794 mSave = nullptr;
795
796 DestroyChildren();
797 SetSizer( nullptr );
798
799 mSelectedCommand = 0;
800 SetMinSize( wxSize( 200,200 ));
801
802 // Get and set position for optical stability.
803 // Expanded and shrunk dialogs 'stay where they were'.
804 // That's OK , and what we want, even if we exapnd off-screen.
805 // We won't shrink to being off-screen, since the shrink button
806 // was clicked, so must have been on screen.
807 wxPoint p = GetPosition( );
808 if( mbExpanded )
809 Populate();
810 else
811 ApplyMacroDialog::Populate();
812 SetPosition( p );
813 mResize->SetFocus();
814
815 auto Title = WindowTitle();
816 SetLabel( Title ); // Provide visual label
817 SetName( Title ); // Provide audible label
818 SetTitle( Title );
819}
820
821void MacrosWindow::OnExpand(wxCommandEvent &WXUNUSED(event))
822{ UpdateDisplay( true );}

Callers 2

OnManageMacrosFunction · 0.45
OnApplyMacrosPaletteFunction · 0.45

Calls 2

wxSizeClass · 0.50
SetFocusMethod · 0.45

Tested by

no test coverage detected