@@ -151,7 +151,7 @@ void MainWindow::createActions()
151151 connect (ui->actionSave_all , SIGNAL (triggered ()), this , SLOT (onFileSaveAll ()));
152152 connect (ui->actionTo_image , SIGNAL (triggered ()), this , SLOT (onFileExportToImage ()));
153153
154- connect (ui->actionClose_All , SIGNAL (triggered ()), mTabWidget , SLOT (closeAllDocuments ()) );
154+ connect (ui->actionClose_All , SIGNAL (triggered ()), mTabWidget , SLOT (closeAllDocuments ()));
155155 connect (ui->actionClose , SIGNAL (triggered ()), mTabWidget , SLOT (close ()));
156156 connect (ui->actionClose_Others , SIGNAL (triggered ()), mTabWidget , SLOT (closeOtherDocuments ()));
157157 connect (ui->actionClose , SIGNAL (triggered ()), this , SLOT (onUpdateMenu ()));
@@ -600,15 +600,6 @@ void MainWindow::updateDockWidgets(bool visible)
600600 }
601601 }else
602602 {
603- if (!mStates .contains (windowClassName))
604- {
605- // Read window state from settings.
606- QSettings settings;
607- mStates [windowClassName] = settings.value (getSettingKeyValueForWindow (windowClassName)).toByteArray ();
608- }
609-
610- QByteArray b = mStates [windowClassName];
611-
612603 foreach (QWidget* w, mLastActiveWindow ->widgetsForDocks ())
613604 {
614605 if (!mDockWidgets .contains (w->objectName ()))
@@ -618,13 +609,8 @@ void MainWindow::updateDockWidgets(bool visible)
618609 d->setObjectName (w->objectName ());
619610 }
620611 mDockWidgets [w->objectName ()]->setWidget (w);
621-
622- if (b.isEmpty ())
623612 addDockWidget (Qt::RightDockWidgetArea, mDockWidgets [w->objectName ()]);
624613 }
625-
626- if (!b.isEmpty ())
627- restoreState (b);
628614 }
629615}
630616
0 commit comments