1
0
mirror of https://github.com/strawberrymusicplayer/strawberry synced 2025-01-22 13:40:28 +01:00

Save and restore geometry in edit tag dialog

This commit is contained in:
Jonas Kvinge 2020-11-22 03:37:15 +01:00
parent 6ab6e6d3a8
commit fcd4e5aca2

View File

@ -848,7 +848,11 @@ void EditTagDialog::showEvent(QShowEvent *e) {
// Restore the tab that was current last time.
QSettings s;
s.beginGroup(kSettingsGroup);
if (s.contains("geometry")) {
restoreGeometry(s.value("geometry").toByteArray());
}
ui_->tab_widget->setCurrentIndex(s.value("current_tab").toInt());
s.endGroup();
QDialog::showEvent(e);
@ -859,7 +863,9 @@ void EditTagDialog::hideEvent(QHideEvent *e) {
// Save the current tab
QSettings s;
s.beginGroup(kSettingsGroup);
s.setValue("geometry", saveGeometry());
s.setValue("current_tab", ui_->tab_widget->currentIndex());
s.endGroup();
QDialog::hideEvent(e);