Partial fix for #399, sometimes(!) the initial tab has the correct widget focused

This commit is contained in:
thrust26 2018-12-29 23:30:12 +01:00
parent c5c3014819
commit c1d5020ea0
4 changed files with 7 additions and 10 deletions

View File

@ -98,11 +98,13 @@ void Dialog::open()
parent().addDialog(this);
center();
loadConfig();
// (Re)-build the focus list to use for the widgets which are currently
// onscreen
buildCurrentFocusList();
buildCurrentFocusList(0);
loadConfig();
_visible = true;

View File

@ -126,7 +126,7 @@ void TabWidget::updateActiveTab()
setDirty();
// Redraw focused areas
_boss->redrawFocus();
_boss->redrawFocus(); // TJ: Does nothing!
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@ -240,7 +240,7 @@ bool TabWidget::handleEvent(Event::Type event)
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void TabWidget::loadConfig()
{
if(_firstTime)
//if(_firstTime)
{
setActiveTab(_activeTab, true);
_firstTime = false;

View File

@ -196,11 +196,6 @@ UIDialog::UIDialog(OSystem& osystem, DialogContainer& parent,
addBGroupToFocusList(wid);
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
UIDialog::~UIDialog()
{
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void UIDialog::loadConfig()
{

View File

@ -35,7 +35,7 @@ class UIDialog : public Dialog
{
public:
UIDialog(OSystem& osystem, DialogContainer& parent, const GUI::Font& font);
virtual ~UIDialog();
virtual ~UIDialog() = default;
private:
void loadConfig() override;