diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-08-02 21:04:44 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-08-02 21:04:44 +0100 |
commit | 4e8bc5462a01818f0f9c92a09f1bdc68821187f4 (patch) | |
tree | 77d6ba35c07a89bcb0002ce644a363f86cd4d772 /cui | |
parent | 40c889105ff758ae09c7d9f423fbc3b85d5e2a53 (diff) |
Related: tdf#101196 prompt to restart after OpenGL config changes
Change-Id: If0ade12ed4cf360bdac8cfbec7bb09c9a640fc6d
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/options/optgdlg.cxx | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx index 1f6019fc98ba..5c7944d2451a 100644 --- a/cui/source/options/optgdlg.cxx +++ b/cui/source/options/optgdlg.cxx @@ -868,8 +868,13 @@ bool OfaViewTabPage::FillItemSet( SfxItemSet* ) } } - mpOpenGLConfig->setUseOpenGL(m_pUseOpenGL->IsChecked()); - mpOpenGLConfig->setForceOpenGL(m_pForceOpenGL->IsChecked()); + if (m_pUseOpenGL->IsValueChangedFromSaved() || + m_pForceOpenGL->IsValueChangedFromSaved()) + { + mpOpenGLConfig->setUseOpenGL(m_pUseOpenGL->IsChecked()); + mpOpenGLConfig->setForceOpenGL(m_pForceOpenGL->IsChecked()); + bModified = true; + } if( bMenuOptModified ) { @@ -898,6 +903,15 @@ bool OfaViewTabPage::FillItemSet( SfxItemSet* ) } } + if (m_pUseOpenGL->IsValueChangedFromSaved() || + m_pForceOpenGL->IsValueChangedFromSaved()) + { + SolarMutexGuard aGuard; + svtools::executeRestartDialog( + comphelper::getProcessComponentContext(), nullptr, + svtools::RESTART_REASON_OPENGL); + } + return bModified; } @@ -985,6 +999,9 @@ void OfaViewTabPage::Reset( const SfxItemSet* ) #endif m_pFontShowCB->SaveValue(); + m_pUseOpenGL->SaveValue(); + m_pForceOpenGL->SaveValue(); + #if defined( UNX ) LINK( this, OfaViewTabPage, OnAntialiasingToggled ).Call( *m_pFontAntiAliasing ); #endif |