diff --git a/src/snapshot.cpp b/src/snapshot.cpp --- a/src/snapshot.cpp +++ b/src/snapshot.cpp @@ -25,14 +25,14 @@ #include "snapshot.h" #include "snapshotview.h" -Snapshot::Snapshot(MainWindow* parent, QString name, ChannelInfoModel infoModel) : +Snapshot::Snapshot(MainWindow* parent, QString name, ChannelInfoModel infoModel, bool saved) : QObject(parent), cInfoModel(infoModel), _showAction(this), _deleteAction("&Delete", this) { _name = name; - _saved = false; + _saved = saved; view = NULL; mainWindow = parent; diff --git a/src/snapshot.h b/src/snapshot.h --- a/src/snapshot.h +++ b/src/snapshot.h @@ -36,7 +36,7 @@ class Snapshot : public QObject Q_OBJECT public: - Snapshot(MainWindow* parent, QString name, ChannelInfoModel infoModel); + Snapshot(MainWindow* parent, QString name, ChannelInfoModel infoModel, bool saved = false); ~Snapshot(); QVector> data; diff --git a/src/snapshotmanager.cpp b/src/snapshotmanager.cpp --- a/src/snapshotmanager.cpp +++ b/src/snapshotmanager.cpp @@ -194,7 +194,8 @@ void SnapshotManager::loadSnapshotFromFi ChannelInfoModel channelInfo(channelNames); auto snapshot = new Snapshot( - _mainWindow, QFileInfo(fileName).baseName(), ChannelInfoModel(channelNames)); + _mainWindow, QFileInfo(fileName).baseName(), + ChannelInfoModel(channelNames), true); snapshot->data = data; addSnapshot(snapshot, false);