Reduce some flickering in PCM.

(cherry picked from commit b592017495)
This commit is contained in:
Alex 2023-02-24 20:06:33 +03:00 committed by dsa-t
parent 5a501c8e48
commit 59b68154e1
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 ), DIALOG_PCM_BASE( parent ),
m_pcm( pcm ) m_pcm( pcm )
{ {
SetDoubleBuffered( true );
m_defaultBitmap = KiBitmap( BITMAPS::icon_pcm ); m_defaultBitmap = KiBitmap( BITMAPS::icon_pcm );
m_pcm->SetDialogWindow( this ); m_pcm->SetDialogWindow( this );
@ -313,6 +315,8 @@ void DIALOG_PCM::OnRepositoryChoice( wxCommandEvent& event )
void DIALOG_PCM::setRepositoryData( const wxString& aRepositoryId ) void DIALOG_PCM::setRepositoryData( const wxString& aRepositoryId )
{ {
m_dialogNotebook->Freeze();
if( m_pcm->CacheRepository( aRepositoryId ) ) if( m_pcm->CacheRepository( aRepositoryId ) )
{ {
for( const auto& [ packageType, packagesView ] : m_repositoryContentPanels ) for( const auto& [ packageType, packagesView ] : m_repositoryContentPanels )
@ -378,6 +382,8 @@ void DIALOG_PCM::setRepositoryData( const wxString& aRepositoryId )
m_dialogNotebook->SetPageText( 0, wxString::Format( _( "Repository (%d)" ), m_dialogNotebook->SetPageText( 0, wxString::Format( _( "Repository (%d)" ),
(int) packages.size() ) ); (int) packages.size() ) );
} }
m_dialogNotebook->Thaw();
} }