Skip to content

Commit

Permalink
fix flamegraph paths are not visible
Browse files Browse the repository at this point in the history
after closing hotspot and reoping it the paths are empty. This fixes it
  • Loading branch information
lievenhey authored and milianw committed Aug 19, 2021
1 parent 5f59ef9 commit f1ef65a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/settingsdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,13 @@ void SettingsDialog::addFlamegraphPage()
flamegraphPage->userPaths->insertStringList(Settings::instance()->userPaths());
flamegraphPage->systemPaths->insertStringList(Settings::instance()->systemPaths());

connect(Settings::instance(), &Settings::pathsChanged, this, [this] {
flamegraphPage->userPaths->clear();
flamegraphPage->systemPaths->clear();
flamegraphPage->userPaths->insertStringList(Settings::instance()->userPaths());
flamegraphPage->systemPaths->insertStringList(Settings::instance()->systemPaths());
});

connect(buttonBox(), &QDialogButtonBox::accepted, this, [this] {
Settings::instance()->setPaths(flamegraphPage->userPaths->items(), flamegraphPage->systemPaths->items());
});
Expand Down

0 comments on commit f1ef65a

Please sign in to comment.