Added SnapshotDB::snapshot_with_vendor_preset() utility function

to find out whether there has ever been a snapshot taken with a given
configuration version.

Implemented an "on snapshot" flag, which indicates, whether the current
state equals to some snapshot. If so, a new snapshot is not taken
in upgrade / downgrade case.
This commit is contained in:
bubnikv 2018-04-20 10:26:23 +02:00
parent c3c9ebdd12
commit ab397e5ce1
5 changed files with 168 additions and 30 deletions

View file

@ -17,14 +17,14 @@ namespace Config {
class ConfigSnapshotDialog : public wxDialog
{
public:
ConfigSnapshotDialog(const Config::SnapshotDB &snapshot_db);
ConfigSnapshotDialog(const Config::SnapshotDB &snapshot_db, const std::string &id);
const std::string& snapshot_to_activate() const { return m_snapshot_to_activate; }
private:
void onLinkClicked(wxHtmlLinkEvent &event);
void onCloseDialog(wxEvent &);
// If set, it contains a snapshot ID to be restored after the dialog closes.
std::string m_snapshot_to_activate;
};