mirror of
https://github.com/strawberrymusicplayer/strawberry
synced 2025-02-02 10:36:45 +01:00
Save and restore geometry in edit tag dialog
This commit is contained in:
parent
6ab6e6d3a8
commit
fcd4e5aca2
@ -848,7 +848,11 @@ void EditTagDialog::showEvent(QShowEvent *e) {
|
|||||||
// Restore the tab that was current last time.
|
// Restore the tab that was current last time.
|
||||||
QSettings s;
|
QSettings s;
|
||||||
s.beginGroup(kSettingsGroup);
|
s.beginGroup(kSettingsGroup);
|
||||||
|
if (s.contains("geometry")) {
|
||||||
|
restoreGeometry(s.value("geometry").toByteArray());
|
||||||
|
}
|
||||||
ui_->tab_widget->setCurrentIndex(s.value("current_tab").toInt());
|
ui_->tab_widget->setCurrentIndex(s.value("current_tab").toInt());
|
||||||
|
s.endGroup();
|
||||||
|
|
||||||
QDialog::showEvent(e);
|
QDialog::showEvent(e);
|
||||||
|
|
||||||
@ -859,7 +863,9 @@ void EditTagDialog::hideEvent(QHideEvent *e) {
|
|||||||
// Save the current tab
|
// Save the current tab
|
||||||
QSettings s;
|
QSettings s;
|
||||||
s.beginGroup(kSettingsGroup);
|
s.beginGroup(kSettingsGroup);
|
||||||
|
s.setValue("geometry", saveGeometry());
|
||||||
s.setValue("current_tab", ui_->tab_widget->currentIndex());
|
s.setValue("current_tab", ui_->tab_widget->currentIndex());
|
||||||
|
s.endGroup();
|
||||||
|
|
||||||
QDialog::hideEvent(e);
|
QDialog::hideEvent(e);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user