Merge pull request #451 from Kellermorph/makro
Some checks failed
Auto-build doxygen docs / doxygen (push) Failing after 2m31s
Auto-build doxygen docs / deploy (push) Has been skipped

Draft: Feature - Introduce User Templates Collection and Dedicated UI Tab
This commit is contained in:
Laurent Trinques
2026-04-26 14:10:07 +02:00
committed by GitHub
23 changed files with 1070 additions and 236 deletions

View File

@@ -24,6 +24,7 @@
#include "qeticons.h"
#include "qetproject.h"
#include "titleblock/templatedeleter.h"
#include <QFileInfo>
/*
When the ENABLE_PANEL_WIDGET_DND_CHECKS flag is set, the panel
@@ -152,6 +153,11 @@ void ElementsPanelWidget::openDirectoryForSelectedItem()
if (QTreeWidgetItem *qtwi = elements_panel -> currentItem()) {
QString dir_path = elements_panel -> dirPathForItem(qtwi);
if (!dir_path.isEmpty()) {
QFileInfo fileInfo(dir_path);
// Wenn der Pfad auf eine Datei (z.B. Makro) zeigt, isoliere den Ordnerpfad
if (fileInfo.isFile()) {
dir_path = fileInfo.absolutePath();
}
QDesktopServices::openUrl(QUrl::fromLocalFile(dir_path));
}
}