From a92ebf56d97aa4bd48e8d5778d15edba78175271 Mon Sep 17 00:00:00 2001 From: DavidXanatos <3890945+DavidXanatos@users.noreply.github.com> Date: Sun, 9 Apr 2023 12:26:16 +0200 Subject: [PATCH] 1.8.5 --- CHANGELOG.md | 7 +++++++ SandboxiePlus/SandMan/Windows/OptionsWindow.cpp | 17 ++++++++++++++--- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f5cad6ae..52f8c75a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,12 @@ This project adheres to [Semantic Versioning](http://semver.org/). +## [1.8.5 / 5.63.5] - 2023-04-?? + +### Fixed +- fixed issue with group renaming in the sandman UI [#2804](https://github.com/sandboxie-plus/Sandboxie/issues/2804) + + ## [1.8.4 / 5.63.4] - 2023-04-07 ### Added @@ -185,6 +191,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). -- Note: these can only be changed when the box is empty - added new file migration option page with additional settings - added SBIE2113/SBIE2114/SBIE2115 message to indicate when files are not migrated due to presets +- added 'NoParallelLoading=y' to disable parallel loading of dlls to debug loader issues ### changed - moved SeparateUserFolders checkbox from global settings to per box options diff --git a/SandboxiePlus/SandMan/Windows/OptionsWindow.cpp b/SandboxiePlus/SandMan/Windows/OptionsWindow.cpp index 088abf25..d82773ad 100644 --- a/SandboxiePlus/SandMan/Windows/OptionsWindow.cpp +++ b/SandboxiePlus/SandMan/Windows/OptionsWindow.cpp @@ -33,13 +33,20 @@ public: class ProgramsDelegate : public QStyledItemDelegate { public: - ProgramsDelegate(COptionsWindow* pOptions, QTreeWidget* pTree, int Column, QObject* parent = 0) : QStyledItemDelegate(parent) { m_pOptions = pOptions; m_pTree = pTree; m_Column = Column; } + ProgramsDelegate(COptionsWindow* pOptions, QTreeWidget* pTree, int Column, QObject* parent = 0) : QStyledItemDelegate(parent) { + m_pOptions = pOptions; + m_pTree = pTree; + m_Column = (m_Group = (Column == -2)) ? -1 : Column; + } virtual QWidget* createEditor(QWidget* parent, const QStyleOptionViewItem& option, const QModelIndex& index) const { QTreeWidgetItem* pItem = ((QTreeWidgetHacker*)m_pTree)->itemFromIndex(index); if (!pItem->data(index.column(), Qt::UserRole).isValid()) return NULL; + if(m_Group && !pItem->parent()) // for groups use simple edit + return QStyledItemDelegate::createEditor(parent, option, index); + if (m_Column == -1 || pItem->data(m_Column, Qt::UserRole).toInt() == COptionsWindow::eProcess) { QComboBox* pBox = new QComboBox(parent); pBox->setEditable(true); @@ -115,7 +122,9 @@ public: if (pEdit) { QTreeWidgetItem* pItem = ((QTreeWidgetHacker*)m_pTree)->itemFromIndex(index); pItem->setText(index.column(), pEdit->text()); - pItem->setData(index.column(), Qt::UserRole, pEdit->text()); + QString Value = pEdit->text(); + if (m_Group) Value = "<" + Value + ">"; + pItem->setData(index.column(), Qt::UserRole, Value); } } @@ -123,8 +132,10 @@ protected: COptionsWindow* m_pOptions; QTreeWidget* m_pTree; int m_Column; + bool m_Group; }; + ////////////////////////////////////////////////////////////////////////// // COptionsWindow @@ -411,7 +422,7 @@ COptionsWindow::COptionsWindow(const QSharedPointer& pBox, const QStri connect(ui.btnAddProg, SIGNAL(clicked(bool)), this, SLOT(OnAddProg())); connect(ui.btnDelProg, SIGNAL(clicked(bool)), this, SLOT(OnDelProg())); connect(ui.chkShowGroupTmpl, SIGNAL(clicked(bool)), this, SLOT(OnShowGroupTmpl())); - ui.treeGroups->setItemDelegateForColumn(0, new ProgramsDelegate(this, ui.treeGroups, -1, this)); + ui.treeGroups->setItemDelegateForColumn(0, new ProgramsDelegate(this, ui.treeGroups, -2, this)); connect(ui.treeGroups, SIGNAL(itemChanged(QTreeWidgetItem *, int)), this, SLOT(OnGroupsChanged(QTreeWidgetItem *, int))); //