mirror of https://github.com/stella-emu/stella.git
Partial fix for #399, sometimes(!) the initial tab has the correct widget focused
This commit is contained in:
parent
c5c3014819
commit
c1d5020ea0
|
@ -98,11 +98,13 @@ void Dialog::open()
|
||||||
parent().addDialog(this);
|
parent().addDialog(this);
|
||||||
|
|
||||||
center();
|
center();
|
||||||
loadConfig();
|
|
||||||
|
|
||||||
// (Re)-build the focus list to use for the widgets which are currently
|
// (Re)-build the focus list to use for the widgets which are currently
|
||||||
// onscreen
|
// onscreen
|
||||||
buildCurrentFocusList();
|
buildCurrentFocusList(0);
|
||||||
|
|
||||||
|
loadConfig();
|
||||||
|
|
||||||
_visible = true;
|
_visible = true;
|
||||||
|
|
||||||
|
|
|
@ -126,7 +126,7 @@ void TabWidget::updateActiveTab()
|
||||||
setDirty();
|
setDirty();
|
||||||
|
|
||||||
// Redraw focused areas
|
// Redraw focused areas
|
||||||
_boss->redrawFocus();
|
_boss->redrawFocus(); // TJ: Does nothing!
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
@ -240,7 +240,7 @@ bool TabWidget::handleEvent(Event::Type event)
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void TabWidget::loadConfig()
|
void TabWidget::loadConfig()
|
||||||
{
|
{
|
||||||
if(_firstTime)
|
//if(_firstTime)
|
||||||
{
|
{
|
||||||
setActiveTab(_activeTab, true);
|
setActiveTab(_activeTab, true);
|
||||||
_firstTime = false;
|
_firstTime = false;
|
||||||
|
|
|
@ -196,11 +196,6 @@ UIDialog::UIDialog(OSystem& osystem, DialogContainer& parent,
|
||||||
addBGroupToFocusList(wid);
|
addBGroupToFocusList(wid);
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
||||||
UIDialog::~UIDialog()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void UIDialog::loadConfig()
|
void UIDialog::loadConfig()
|
||||||
{
|
{
|
||||||
|
|
|
@ -35,7 +35,7 @@ class UIDialog : public Dialog
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
UIDialog(OSystem& osystem, DialogContainer& parent, const GUI::Font& font);
|
UIDialog(OSystem& osystem, DialogContainer& parent, const GUI::Font& font);
|
||||||
virtual ~UIDialog();
|
virtual ~UIDialog() = default;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void loadConfig() override;
|
void loadConfig() override;
|
||||||
|
|
Loading…
Reference in New Issue