Clear pinned items tool.

This commit is contained in:
Jindra Petřík
2022-11-19 13:45:54 +01:00
parent 96c63be654
commit 8ac2ff192a
5 changed files with 28 additions and 2 deletions

View File

@@ -61,6 +61,19 @@ public class PinsPanel extends JPanel {
setBorder(BorderFactory.createEmptyBorder(5, 0, 0, 0));
}
/**
* Totally destroy and save empty
*/
public void destroy() {
items.clear();
rebuild();
save();
}
/**
* Removes all items reference, saves them as paths.
*
*/
public void clear() {
for (TreeItem item : items) {
String tagTreePath = mainPanel.tagTree.getItemPathString(item);