ScanPopup: Some more of save/restore position of the pinned popup window

This commit is contained in:
Abs62 2023-02-14 22:40:08 +03:00
parent 74aa95220d
commit e43c0d2521
2 changed files with 12 additions and 0 deletions

View file

@ -1074,6 +1074,14 @@ void ScanPopup::closeEvent( QCloseEvent * ev )
QMainWindow::closeEvent( ev );
}
void ScanPopup::moveEvent( QMoveEvent * ev )
{
if( isVisible() && ui.pinButton->isChecked() )
pinnedGeometry = saveGeometry();
QMainWindow::moveEvent( ev );
}
void ScanPopup::prefixMatchFinished()
{
// Check that there's a window there at all
@ -1120,6 +1128,9 @@ void ScanPopup::pinButtonClicked( bool checked )
}
show();
if( checked )
pinnedGeometry = saveGeometry();
}
void ScanPopup::focusTranslateLine()

View file

@ -180,6 +180,7 @@ private:
virtual void enterEvent( QEvent * event );
virtual void showEvent( QShowEvent * );
virtual void closeEvent( QCloseEvent * );
virtual void moveEvent( QMoveEvent * );
/// Returns inputWord, chopped with appended ... if it's too long/
QString elideInputWord();