Fix saved unsync list

This commit is contained in:
Florian Märkl 2019-06-18 19:28:20 +02:00
parent 06aceaf9b1
commit 0c3b7e7f07

View File

@ -698,15 +698,11 @@ void MainWindow::saveSettings()
QSettings settings;
QStringList docks;
const QStringList syncable = QStringList()
<< HexdumpWidget::getWidgetType()
<< DisassemblyWidget::getWidgetType()
<< GraphWidget::getWidgetType();
QStringList unsync;
for (const auto &it : dockWidgets) {
docks.append(it->objectName());
if (syncable.contains(it->metaObject()->className()) &&
!qobject_cast<MemoryDockWidget*>(it)->getSeekable()->isSynchronized()) {
auto memoryDockWidget = qobject_cast<MemoryDockWidget*>(it);
if (memoryDockWidget && !memoryDockWidget->getSeekable()->isSynchronized()) {
unsync.append(it->objectName());
}
}