diff --git a/config.cc b/config.cc index af5d7c60..21b94d40 100644 --- a/config.cc +++ b/config.cc @@ -1100,6 +1100,11 @@ Class load() THROW_SPEC( exError ) if ( !inspectorGeometry.isNull() ) c.inspectorGeometry = QByteArray::fromBase64( inspectorGeometry.toElement().text().toLatin1() ); + QDomNode dictionariesDialogGeometry = root.namedItem( "dictionariesDialogGeometry" ); + + if ( !dictionariesDialogGeometry.isNull() ) + c.dictionariesDialogGeometry = QByteArray::fromBase64( dictionariesDialogGeometry.toElement().text().toLatin1() ); + QDomNode timeForNewReleaseCheck = root.namedItem( "timeForNewReleaseCheck" ); if ( !timeForNewReleaseCheck.isNull() ) @@ -2094,6 +2099,10 @@ void save( Class const & c ) THROW_SPEC( exError ) opt.appendChild( dd.createTextNode( QString::fromLatin1( c.inspectorGeometry.toBase64() ) ) ); root.appendChild( opt ); + opt = dd.createElement( "dictionariesDialogGeometry" ); + opt.appendChild( dd.createTextNode( QString::fromLatin1( c.dictionariesDialogGeometry.toBase64() ) ) ); + root.appendChild( opt ); + opt = dd.createElement( "timeForNewReleaseCheck" ); opt.appendChild( dd.createTextNode( c.timeForNewReleaseCheck.toString( Qt::ISODate ) ) ); root.appendChild( opt ); diff --git a/config.hh b/config.hh index 1d5b19be..811ce43d 100644 --- a/config.hh +++ b/config.hh @@ -677,6 +677,7 @@ struct Class QByteArray popupWindowGeometry; // Geometry saved by QMainWindow QByteArray dictInfoGeometry; // Geometry of "Dictionary info" window QByteArray inspectorGeometry; // Geometry of WebKit inspector window + QByteArray dictionariesDialogGeometry; // Geometry of Dictionaries dialog QByteArray helpWindowGeometry; // Geometry of help window QByteArray helpSplitterState; // Geometry of help splitter diff --git a/mainwindow.cc b/mainwindow.cc index 9e015a94..5b83b391 100644 --- a/mainwindow.cc +++ b/mainwindow.cc @@ -2035,7 +2035,9 @@ void MainWindow::editDictionaries( unsigned editDictionaryGroup ) if ( editDictionaryGroup != Instances::Group::NoGroupId ) dicts.editGroup( editDictionaryGroup ); + dicts.restoreGeometry( cfg.dictionariesDialogGeometry ); dicts.exec(); + cfg.dictionariesDialogGeometry = newCfg.dictionariesDialogGeometry = dicts.saveGeometry(); if ( dicts.areDictionariesChanged() || dicts.areGroupsChanged() ) {