For Qt GUI, added code to save/restore window geometry for ROM selection from archive dialog.
This commit is contained in:
parent
584593816f
commit
be38e34a06
|
@ -35,6 +35,7 @@
|
|||
#include <QPixmap>
|
||||
#include <QWindow>
|
||||
#include <QScreen>
|
||||
#include <QSettings>
|
||||
#include <QHeaderView>
|
||||
#include <QFileInfo>
|
||||
#include <QFileDialog>
|
||||
|
@ -2324,6 +2325,7 @@ int consoleWin_t::showListSelectDialog( const char *title, std::vector <std::st
|
|||
QPushButton *okButton, *cancelButton;
|
||||
QTreeWidget *tree;
|
||||
QTreeWidgetItem *item;
|
||||
QSettings settings;
|
||||
|
||||
dialog.setWindowTitle( tr(title) );
|
||||
|
||||
|
@ -2371,8 +2373,15 @@ int consoleWin_t::showListSelectDialog( const char *title, std::vector <std::st
|
|||
|
||||
dialog.setLayout( mainLayout );
|
||||
|
||||
// Restore Window Geometry
|
||||
dialog.restoreGeometry(settings.value("ArchiveViewer/geometry").toByteArray());
|
||||
|
||||
// Run Dialog Execution Loop
|
||||
ret = dialog.exec();
|
||||
|
||||
// Save Window Geometry
|
||||
settings.setValue("ArchiveViewer/geometry", dialog.saveGeometry());
|
||||
|
||||
if ( ret == QDialog::Accepted )
|
||||
{
|
||||
idx = 0;
|
||||
|
|
Loading…
Reference in New Issue