Reduce some flickering in PCM.

This commit is contained in:
Alex 2023-02-24 20:06:33 +03:00
parent c188318174
commit b592017495
1 changed files with 6 additions and 0 deletions

View File

@ -57,6 +57,8 @@ DIALOG_PCM::DIALOG_PCM( wxWindow* parent, std::shared_ptr<PLUGIN_CONTENT_MANAGER
DIALOG_PCM_BASE( parent ),
m_pcm( pcm )
{
SetDoubleBuffered( true );
m_defaultBitmap = KiBitmap( BITMAPS::icon_pcm );
m_pcm->SetDialogWindow( this );
@ -312,6 +314,8 @@ void DIALOG_PCM::OnRepositoryChoice( wxCommandEvent& event )
void DIALOG_PCM::setRepositoryData( const wxString& aRepositoryId )
{
m_dialogNotebook->Freeze();
if( m_pcm->CacheRepository( aRepositoryId ) )
{
for( const auto& [ packageType, packagesView ] : m_repositoryContentPanels )
@ -377,6 +381,8 @@ void DIALOG_PCM::setRepositoryData( const wxString& aRepositoryId )
m_dialogNotebook->SetPageText( 0, wxString::Format( _( "Repository (%d)" ),
(int) packages.size() ) );
}
m_dialogNotebook->Thaw();
}