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; QSettings settings;
QStringList docks; QStringList docks;
const QStringList syncable = QStringList()
<< HexdumpWidget::getWidgetType()
<< DisassemblyWidget::getWidgetType()
<< GraphWidget::getWidgetType();
QStringList unsync; QStringList unsync;
for (const auto &it : dockWidgets) { for (const auto &it : dockWidgets) {
docks.append(it->objectName()); docks.append(it->objectName());
if (syncable.contains(it->metaObject()->className()) && auto memoryDockWidget = qobject_cast<MemoryDockWidget*>(it);
!qobject_cast<MemoryDockWidget*>(it)->getSeekable()->isSynchronized()) { if (memoryDockWidget && !memoryDockWidget->getSeekable()->isSynchronized()) {
unsync.append(it->objectName()); unsync.append(it->objectName());
} }
} }