From 9f7bc6a9f9330c18594c2e3437113fc830755abf Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Thu, 11 Oct 2018 18:50:52 +0100 Subject: [PATCH] A bit of a hack to keep OpenGL from puking. --- common/kiway.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/common/kiway.cpp b/common/kiway.cpp index b9805b1a13..39932339b0 100644 --- a/common/kiway.cpp +++ b/common/kiway.cpp @@ -443,14 +443,22 @@ void KIWAY::CommonSettingsChanged() } #endif + // OK, this is a hack, but it keeps OpenGL from puking when updating + // something like grid settings when several OpenGL canvasses are open. for( unsigned i=0; i < KIWAY_PLAYER_COUNT; ++i ) { KIWAY_PLAYER* frame = GetPlayerFrame( ( FRAME_T )i ); - if( frame ) - { + if( frame && frame->IsActive() ) + frame->CommonSettingsChanged(); + } + + for( unsigned i=0; i < KIWAY_PLAYER_COUNT; ++i ) + { + KIWAY_PLAYER* frame = GetPlayerFrame( ( FRAME_T )i ); + + if( frame && !frame->IsActive() ) frame->CommonSettingsChanged(); - } } }