Skip to content

Commit

Permalink
#5417: Work around a GL repaint problem happening that seems to be fi…
Browse files Browse the repository at this point in the history
…xed in wxGTK 3.1.3+
  • Loading branch information
codereader committed Nov 26, 2020
1 parent 5bcd56c commit 505a16d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
9 changes: 8 additions & 1 deletion radiant/ui/common/TexturePreviewCombo.cpp
Expand Up @@ -52,7 +52,14 @@ void TexturePreviewCombo::SetTexture(const std::string& tex)
{
_texName = tex;
refreshInfoTable();
_glWidget->Refresh();

_glWidget->Refresh(false);

#if defined(__WXGTK__) && !wxCHECK_VERSION(3, 1, 3)
// Just calling Refresh doesn't cut it before wxGTK 3.1.3
// the GLWidget::OnPaint event is never invoked unless we call Update()
_glWidget->Update();
#endif
}

// Refresh the info table
Expand Down
8 changes: 7 additions & 1 deletion radiant/ui/texturebrowser/TextureBrowser.cpp
Expand Up @@ -361,7 +361,13 @@ void TextureBrowser::queueDraw()
{
if (_wxGLWidget != nullptr)
{
_wxGLWidget->Refresh();
_wxGLWidget->Refresh(false);

#if defined(__WXGTK__) && !wxCHECK_VERSION(3, 1, 3)
// Just calling Refresh doesn't cut it before wxGTK 3.1.3
// the GLWidget::OnPaint event is never invoked unless we call Update()
_wxGLWidget->Update();
#endif
}
}

Expand Down

0 comments on commit 505a16d

Please sign in to comment.