ftw: remove inheritance, make sure warning popup shows

Turns out we had an unneeded layer of inheritance in the name of
BasePathsPanel, whose only job was to, wait for it, be inherited.
It is an empty class inheriting wxPanel instead of the needed
BaseApplicationConfigPanel, making it all the more unecessary.

Someone _really_ loved their OOP.

Also added back the OnShown trigger for the BIOS page to ensure BIOS
confirmity.
This commit is contained in:
Gauvain 'GovanifY' Roussel-Tarbouriech 2021-07-28 17:26:51 +02:00 committed by lightningterror
parent 3e1b76c0a9
commit 52cefc5543
3 changed files with 17 additions and 28 deletions

View File

@ -227,6 +227,6 @@ void FirstTimeWizard::OnPageChanging( wxWizardEvent& evt )
void FirstTimeWizard::OnPageChanged( wxWizardEvent& evt )
{
// if( ((sptr)evt.GetPage() == (sptr)&m_page_bios) ) // FirstTimeWizard panel which prevents the user for clicking on finish to the main PCSX2 menu , it has the warning message:
// m_panel_BiosSel.OnShown(); // .SetUserMsg(pxE(L"Please select a valid BIOS. If you are unable to make a valid selection then press Cancel to close the Configuration panel."));
if( ((sptr)evt.GetPage() == (sptr)&m_page_bios) )
m_panel_BiosSel.OnShown();
}

View File

@ -391,30 +391,14 @@ namespace Panels
};
// --------------------------------------------------------------------------------------
// BasePathsPanel / StandardPathsPanel
// StandardPathsPanel
// --------------------------------------------------------------------------------------
class BasePathsPanel : public BaseApplicableConfigPanel
{
public:
BasePathsPanel(wxWindow* parent);
protected:
};
class StandardPathsPanel : public BasePathsPanel
class StandardPathsPanel : public BaseApplicableConfigPanel
{
public:
StandardPathsPanel(wxWindow* parent);
void Apply() override
{
}
void AppStatusEvent_OnSettingsApplied() override
{
}
void Apply();
void AppStatusEvent_OnSettingsApplied();
};
// --------------------------------------------------------------------------------------

View File

@ -22,16 +22,11 @@ using namespace pxSizerFlags;
static const int BetweenFolderSpace = 5;
Panels::BasePathsPanel::BasePathsPanel( wxWindow* parent )
: BaseApplicableConfigPanel( parent, wxVERTICAL )
{
}
// --------------------------------------------------------------------------------------
// Panels::StandardPathsPanel (implementations)
// --------------------------------------------------------------------------------------
Panels::StandardPathsPanel::StandardPathsPanel( wxWindow* parent )
: BasePathsPanel( parent )
: BaseApplicableConfigPanel( parent )
{
*this += BetweenFolderSpace;
*this += (new DirPickerPanel( this, FolderId_Cheats,
@ -79,3 +74,13 @@ Panels::StandardPathsPanel::StandardPathsPanel( wxWindow* parent )
GetSizer()->SetMinSize( wxSize( 475, GetSizer()->GetMinSize().GetHeight() ) );
}
void Panels::StandardPathsPanel::Apply()
{
}
void Panels::StandardPathsPanel::AppStatusEvent_OnSettingsApplied()
{
}