Added save/restore geometry logic for Qt TAS find note dialog.

This commit is contained in:
mjbudd77 2021-12-05 20:30:43 -05:00
parent 2072269edc
commit 8cfab72523
1 changed files with 9 additions and 0 deletions

View File

@ -5665,6 +5665,7 @@ int bookmarkPreviewPopup::loadImage(int index)
TasFindNoteWindow::TasFindNoteWindow( QWidget *parent )
: QDialog( parent, Qt::Window )
{
QSettings settings;
QVBoxLayout *mainLayout, *vbox;
QHBoxLayout *hbox, *hbox1;
QGroupBox *gbox;
@ -5720,14 +5721,22 @@ TasFindNoteWindow::TasFindNoteWindow( QWidget *parent )
connect( nextBtn , SIGNAL(clicked(void)), this, SLOT(findNextClicked(void)) );
connect( searchPattern, SIGNAL(textChanged(const QString &)), this, SLOT(searchPatternChanged(const QString &)) );
// Restore Window Geometry
restoreGeometry(settings.value("tasEditorFindDialog/geometry").toByteArray());
}
//----------------------------------------------------------------------------
TasFindNoteWindow::~TasFindNoteWindow(void)
{
QSettings settings;
if ( findWin == this )
{
findWin = NULL;
}
// Save Window Geometry
settings.setValue("tasEditorFindDialog/geometry", saveGeometry());
}
//----------------------------------------------------------------------------
void TasFindNoteWindow::closeEvent(QCloseEvent *event)