From 2d79d74e06b2f0d3ec652daa25703ff9732acfeb Mon Sep 17 00:00:00 2001 From: Albert S Date: Mon, 28 Sep 2020 19:18:35 +0200 Subject: [PATCH] addToFavourites: only save the minimum --- window.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/window.cpp b/window.cpp index 55e8fd5..b476691 100644 --- a/window.cpp +++ b/window.cpp @@ -127,7 +127,7 @@ void Window::executeConfig(const EntryConfig &config) void Window::addToFavourites(const EntryConfig &config) { std::pair cell = getNextFreeCell(); - EntryConfig userConfig = config; + EntryConfig userConfig; userConfig.userEntry = true; userConfig.row = cell.first; userConfig.col = cell.second; @@ -144,6 +144,10 @@ void Window::addToFavourites(const EntryConfig &config) QMessageBox::critical(this, "Failed to save item to favourites", e.what()); return; } + /*we only want to save a minimal, inherited config. but it should be a "complete" button + when we add it to the favourites. the alternative would be to reload the whole config, + but that's probably overkill. */ + userConfig.update(config); userEntryButtons.append(createEntryButton(userConfig)); }