From 9e485b447efe81ada597be1d131b8161e7c8c56e Mon Sep 17 00:00:00 2001 From: "avihal@gmail.com" Date: Sun, 23 Jan 2011 01:53:01 +0000 Subject: [PATCH] Configuration dialog: The 'Apply' button is now disabled when the dialog is opened (was only being disabled after clicking it, rest of the dialogs were behaving ok). - The automatic disabled Apply on open didn't work for SysConfigDialog because GSWindowPanel and VideoPanel were using SetValue for text boxes when they initialize, which triggered a "SomethingChanged" event (it captures, among others, the wxEVT_COMMAND_TEXT_UPDATED event which is also triggered by SetValue for text boxes). The solution, per wxWindows docs, is to use ChangeValue instead, which doesn't trigger this event. git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4254 96395faa-99c1-11dd-bbfe-3dabce05a288 --- pcsx2/gui/Panels/GSWindowPanel.cpp | 4 ++-- pcsx2/gui/Panels/VideoPanel.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pcsx2/gui/Panels/GSWindowPanel.cpp b/pcsx2/gui/Panels/GSWindowPanel.cpp index a2e1b920ec..7598e0c0b6 100644 --- a/pcsx2/gui/Panels/GSWindowPanel.cpp +++ b/pcsx2/gui/Panels/GSWindowPanel.cpp @@ -133,8 +133,8 @@ void Panels::GSWindowSettingsPanel::ApplyConfigToGui( AppConfig& configToApply, m_check_DclickFullscreen ->SetValue ( conf.IsToggleFullscreenOnDoubleClick ); - m_text_WindowWidth ->SetValue( wxsFormat( L"%d", conf.WindowSize.GetWidth() ) ); - m_text_WindowHeight ->SetValue( wxsFormat( L"%d", conf.WindowSize.GetHeight() ) ); + m_text_WindowWidth ->ChangeValue( wxsFormat( L"%d", conf.WindowSize.GetWidth() ) ); + m_text_WindowHeight ->ChangeValue( wxsFormat( L"%d", conf.WindowSize.GetHeight() ) ); } m_check_VsyncEnable->Enable(!configToApply.EnablePresets); diff --git a/pcsx2/gui/Panels/VideoPanel.cpp b/pcsx2/gui/Panels/VideoPanel.cpp index d86fbc5bb8..de82da38a5 100644 --- a/pcsx2/gui/Panels/VideoPanel.cpp +++ b/pcsx2/gui/Panels/VideoPanel.cpp @@ -129,8 +129,8 @@ void Panels::FramelimiterPanel::ApplyConfigToGui( AppConfig& configToApply, int m_spin_TurboPct ->SetValue( appfps.TurboScalar.Raw ); m_spin_SlomoPct ->SetValue( appfps.SlomoScalar.Raw ); - m_text_BaseNtsc ->SetValue( gsconf.FramerateNTSC.ToString() ); - m_text_BasePal ->SetValue( gsconf.FrameratePAL.ToString() ); + m_text_BaseNtsc ->ChangeValue( gsconf.FramerateNTSC.ToString() ); + m_text_BasePal ->ChangeValue( gsconf.FrameratePAL.ToString() ); m_spin_NominalPct ->Enable(!configToApply.EnablePresets); m_spin_TurboPct ->Enable(!configToApply.EnablePresets);