Added logic to code data and trace logger windows so that if already open, the windows are raised and given input focus.
This commit is contained in:
parent
17933eb86e
commit
2030d18e40
|
@ -52,6 +52,27 @@ static bool autoSaveArmedCDL = false;
|
||||||
static char loadedcdfile[512] = {0};
|
static char loadedcdfile[512] = {0};
|
||||||
|
|
||||||
static int getDefaultCDLFile(char *filepath);
|
static int getDefaultCDLFile(char *filepath);
|
||||||
|
|
||||||
|
static CodeDataLoggerDialog_t *cdlWin = NULL;
|
||||||
|
//----------------------------------------------------
|
||||||
|
int openCDLWindow( QWidget *parent )
|
||||||
|
{
|
||||||
|
//printf("Open Code Data Logger Window\n");
|
||||||
|
|
||||||
|
if ( cdlWin )
|
||||||
|
{
|
||||||
|
cdlWin->activateWindow();
|
||||||
|
cdlWin->raise();
|
||||||
|
cdlWin->setFocus();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
cdlWin = new CodeDataLoggerDialog_t(parent);
|
||||||
|
|
||||||
|
cdlWin->show();
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
//----------------------------------------------------
|
//----------------------------------------------------
|
||||||
CodeDataLoggerDialog_t::CodeDataLoggerDialog_t(QWidget *parent)
|
CodeDataLoggerDialog_t::CodeDataLoggerDialog_t(QWidget *parent)
|
||||||
: QDialog(parent, Qt::Window)
|
: QDialog(parent, Qt::Window)
|
||||||
|
|
|
@ -69,3 +69,4 @@ void RenameCDLog(const char *newName);
|
||||||
void CDLoggerROMClosed(void);
|
void CDLoggerROMClosed(void);
|
||||||
void CDLoggerROMChanged(void);
|
void CDLoggerROMChanged(void);
|
||||||
void SaveCDLogFile(void);
|
void SaveCDLogFile(void);
|
||||||
|
int openCDLWindow( QWidget *parent );
|
||||||
|
|
|
@ -2748,13 +2748,7 @@ void consoleWin_t::openNTViewer(void)
|
||||||
|
|
||||||
void consoleWin_t::openCodeDataLogger(void)
|
void consoleWin_t::openCodeDataLogger(void)
|
||||||
{
|
{
|
||||||
CodeDataLoggerDialog_t *cdlWin;
|
openCDLWindow(this);
|
||||||
|
|
||||||
//printf("Open Code Data Logger Window\n");
|
|
||||||
|
|
||||||
cdlWin = new CodeDataLoggerDialog_t(this);
|
|
||||||
|
|
||||||
cdlWin->show();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void consoleWin_t::openGGEncoder(void)
|
void consoleWin_t::openGGEncoder(void)
|
||||||
|
@ -2763,9 +2757,9 @@ void consoleWin_t::openGGEncoder(void)
|
||||||
|
|
||||||
//printf("Open Game Genie Window\n");
|
//printf("Open Game Genie Window\n");
|
||||||
|
|
||||||
win = new GameGenieDialog_t(this);
|
win = new GameGenieDialog_t(this);
|
||||||
|
|
||||||
win->show();
|
win->show();
|
||||||
}
|
}
|
||||||
|
|
||||||
void consoleWin_t::openNesHeaderEditor(void)
|
void consoleWin_t::openNesHeaderEditor(void)
|
||||||
|
@ -2774,7 +2768,7 @@ void consoleWin_t::openNesHeaderEditor(void)
|
||||||
|
|
||||||
//printf("Open iNES Header Editor Window\n");
|
//printf("Open iNES Header Editor Window\n");
|
||||||
|
|
||||||
win = new iNesHeaderEditor_t(this);
|
win = new iNesHeaderEditor_t(this);
|
||||||
|
|
||||||
if ( win->isInitialized() )
|
if ( win->isInitialized() )
|
||||||
{
|
{
|
||||||
|
|
|
@ -1065,6 +1065,9 @@ void openTraceLoggerWindow(QWidget *parent)
|
||||||
// Only allow one trace logger window to be open
|
// Only allow one trace logger window to be open
|
||||||
if (traceLogWindow != NULL)
|
if (traceLogWindow != NULL)
|
||||||
{
|
{
|
||||||
|
traceLogWindow->activateWindow();
|
||||||
|
traceLogWindow->raise();
|
||||||
|
traceLogWindow->setFocus();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//printf("Open Trace Logger Window\n");
|
//printf("Open Trace Logger Window\n");
|
||||||
|
|
Loading…
Reference in New Issue