Skip to content

Commit

Permalink
Fix crash if only plot window is open and you change i.e. the font si…
Browse files Browse the repository at this point in the history
…ze in preferences
  • Loading branch information
jonjenssen authored and magnesj committed Sep 19, 2022
1 parent 8f9cd55 commit b23dbd6
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions ApplicationLibCode/Application/RiaGuiApplication.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1437,7 +1437,7 @@ void RiaGuiApplication::applyGuiPreferences( const RiaPreferences*
}

QMessageBox::StandardButton reply;
reply = QMessageBox::question( m_mainWindow,
reply = QMessageBox::question( activeMainWindow(),
QString( "Apply %1 to Existing Views or Plots?" ).arg( listString ),
QString( "You have changed default %1 and have existing views or plots with "
"different settings.\n" )
Expand Down Expand Up @@ -1502,7 +1502,10 @@ void RiaGuiApplication::applyGuiPreferences( const RiaPreferences*

if ( oldPreferences->defaultPlotFontSize() != m_preferences->defaultPlotFontSize() )
{
m_mainWindow->applyFontSizesToDockedPlots();
if ( m_mainWindow )
{
m_mainWindow->applyFontSizesToDockedPlots();
}
}

if ( oldPreferences->defaultPageLayout() != m_preferences->defaultPageLayout() )
Expand Down

0 comments on commit b23dbd6

Please sign in to comment.