diff --git a/src/Gui/Dialogs/DlgMacroExecute.ui b/src/Gui/Dialogs/DlgMacroExecute.ui
index 3be506ef36..8ddbff5ac7 100644
--- a/src/Gui/Dialogs/DlgMacroExecute.ui
+++ b/src/Gui/Dialogs/DlgMacroExecute.ui
@@ -313,42 +313,55 @@
- -
-
-
- User macros location:
-
-
-
- 9
-
-
- 9
-
-
- 9
-
-
- 9
-
-
- 6
-
-
-
-
-
- Qt::StrongFocus
-
-
- Gui::FileChooser::Directory
-
-
-
-
-
-
+ -
+
+
+ User macros location:
+
+
+
+ 9
+
+
+ 9
+
+
+ 9
+
+
+ 9
+
+
+ 6
+
+
-
+
+
+ Qt::StrongFocus
+
+
+ Gui::FileChooser::Mode::Directory
+
+
+
+ -
+
+
+ true
+
+
+ Open folder with macros in system file manager.
+
+
+ Open folder
+
+
+
+
+
+
@@ -371,6 +384,7 @@
toolbarButton
addonsButton
fileChooser
+ folderButton
diff --git a/src/Gui/Dialogs/DlgMacroExecuteImp.cpp b/src/Gui/Dialogs/DlgMacroExecuteImp.cpp
index cf90e85acd..1c7649a24b 100644
--- a/src/Gui/Dialogs/DlgMacroExecuteImp.cpp
+++ b/src/Gui/Dialogs/DlgMacroExecuteImp.cpp
@@ -22,6 +22,7 @@
#include "PreCompiled.h"
#ifndef _PreComp_
+#include
#include
#include
#include
@@ -152,6 +153,8 @@ void DlgMacroExecuteImp::setupConnections()
this, &DlgMacroExecuteImp::onToolbarButtonClicked);
connect(ui->addonsButton, &QPushButton::clicked,
this, &DlgMacroExecuteImp::onAddonsButtonClicked);
+ connect(ui->folderButton, &QPushButton::clicked,
+ this, &DlgMacroExecuteImp::onFolderButtonClicked);
connect(ui->userMacroListBox, &QTreeWidget::currentItemChanged,
this, &DlgMacroExecuteImp::onUserMacroListBoxCurrentItemChanged);
connect(ui->systemMacroListBox, &QTreeWidget::currentItemChanged,
@@ -1064,4 +1067,14 @@ void DlgMacroExecuteImp::onAddonsButtonClicked()
this->fillUpList();
}
+/**
+ * convenience link button to open folder with macros
+ * from within macro dialog
+ */
+void DlgMacroExecuteImp::onFolderButtonClicked()
+{
+ QString path = QString::fromStdString(App::Application::getUserMacroDir());
+ QUrl url = QUrl::fromLocalFile(path);
+ QDesktopServices::openUrl(url);
+}
#include "moc_DlgMacroExecuteImp.cpp"
diff --git a/src/Gui/Dialogs/DlgMacroExecuteImp.h b/src/Gui/Dialogs/DlgMacroExecuteImp.h
index 3be7b4b0a4..cf12d5add1 100644
--- a/src/Gui/Dialogs/DlgMacroExecuteImp.h
+++ b/src/Gui/Dialogs/DlgMacroExecuteImp.h
@@ -60,6 +60,7 @@ private:
void onDuplicateButtonClicked();
void onToolbarButtonClicked();
void onAddonsButtonClicked();
+ void onFolderButtonClicked();
void onUserMacroListBoxCurrentItemChanged(QTreeWidgetItem*);
void onSystemMacroListBoxCurrentItemChanged(QTreeWidgetItem*);