mirror of https://github.com/stella-emu/stella.git
fix #613 (debugger focus)
This commit is contained in:
parent
b5d0a5a057
commit
da3d7f1108
|
@ -688,6 +688,7 @@ void Debugger::setStartState()
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void Debugger::setQuitState()
|
void Debugger::setQuitState()
|
||||||
{
|
{
|
||||||
|
myDialog->saveConfig();
|
||||||
saveOldState();
|
saveOldState();
|
||||||
|
|
||||||
// Bus must be unlocked for normal operation when leaving debugger mode
|
// Bus must be unlocked for normal operation when leaving debugger mode
|
||||||
|
|
|
@ -71,12 +71,11 @@ DebuggerDialog::DebuggerDialog(OSystem& osystem, DialogContainer& parent,
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void DebuggerDialog::loadConfig()
|
void DebuggerDialog::loadConfig()
|
||||||
{
|
{
|
||||||
// set initial focus to myPrompt
|
if(myFocusedWidget == nullptr)
|
||||||
if (myFirstLoad)
|
// Set initial focus to prompt tab
|
||||||
{
|
myFocusedWidget = myPrompt;
|
||||||
setFocus(myPrompt);
|
// Restore focus
|
||||||
myFirstLoad = false;
|
setFocus(myFocusedWidget);
|
||||||
}
|
|
||||||
|
|
||||||
myTab->loadConfig();
|
myTab->loadConfig();
|
||||||
myTiaInfo->loadConfig();
|
myTiaInfo->loadConfig();
|
||||||
|
@ -89,6 +88,11 @@ void DebuggerDialog::loadConfig()
|
||||||
myMessageBox->setText("");
|
myMessageBox->setText("");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DebuggerDialog::saveConfig()
|
||||||
|
{
|
||||||
|
myFocusedWidget = _focusedWidget;
|
||||||
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void DebuggerDialog::handleKeyDown(StellaKey key, StellaMod mod, bool repeated)
|
void DebuggerDialog::handleKeyDown(StellaKey key, StellaMod mod, bool repeated)
|
||||||
{
|
{
|
||||||
|
|
|
@ -71,6 +71,7 @@ class DebuggerDialog : public Dialog
|
||||||
ButtonWidget& unwindButton() const { return *myUnwindButton; }
|
ButtonWidget& unwindButton() const { return *myUnwindButton; }
|
||||||
|
|
||||||
void showFatalMessage(const string& msg);
|
void showFatalMessage(const string& msg);
|
||||||
|
void saveConfig();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void center() override { positionAt(0); }
|
void center() override { positionAt(0); }
|
||||||
|
@ -136,7 +137,8 @@ class DebuggerDialog : public Dialog
|
||||||
|
|
||||||
unique_ptr<GUI::Font> myLFont; // used for labels
|
unique_ptr<GUI::Font> myLFont; // used for labels
|
||||||
unique_ptr<GUI::Font> myNFont; // used for normal text
|
unique_ptr<GUI::Font> myNFont; // used for normal text
|
||||||
bool myFirstLoad{true};
|
Widget* myFocusedWidget{nullptr};
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Following constructors and assignment operators not supported
|
// Following constructors and assignment operators not supported
|
||||||
|
|
Loading…
Reference in New Issue