This commit is contained in:
DavidXanatos 2023-05-27 16:14:29 +02:00
parent 8ccc2321d9
commit f31d06ac20
8 changed files with 12 additions and 19 deletions

View File

@ -13,7 +13,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
- fixed an issue with token manipulation in the SbieDrv driver - fixed an issue with token manipulation in the SbieDrv driver
- fixed "Reset all GUI options" does not reset all GUI sections as expected [#2967](https://github.com/sandboxie-plus/Sandboxie/issues/2967) - fixed "Reset all GUI options" does not reset all GUI sections as expected [#2967](https://github.com/sandboxie-plus/Sandboxie/issues/2967)
- fixed sbie:// links below the Box Type presets [#2959](https://github.com/sandboxie-plus/Sandboxie/issues/2959#issuecomment-1565264161) - fixed sbie:// links below the Box Type presets [#2959](https://github.com/sandboxie-plus/Sandboxie/issues/2959#issuecomment-1565264161)
- fixed "Reset all GUI options" makes all sandbox names disappear [#2972](https://github.com/sandboxie-plus/Sandboxie/issues/2972)
## [1.9.5 / 5.64.5] - 2023-05-26 ## [1.9.5 / 5.64.5] - 2023-05-26

View File

@ -57,7 +57,7 @@ void CSimpleListModel::Sync(QList<QVariantMap> List)
QVariantMap Values = Cur["Values"].toMap(); QVariantMap Values = Cur["Values"].toMap();
for(int section = FIRST_COLUMN; section < columnCount(); section++) for(int section = FIRST_COLUMN; section < columnCount(); section++)
{ {
if (!m_Columns.contains(section)) if (!IsColumnEnabled(section))
continue; // ignore columns which are hidden continue; // ignore columns which are hidden
QVariant Value = Values[QString::number(section)]; QVariant Value = Values[QString::number(section)];

View File

@ -113,7 +113,7 @@ void CSimpleTreeModel::Sync(const QMap<QVariant, QVariantMap>& List)
QVariantMap Values = Cur["Values"].toMap(); QVariantMap Values = Cur["Values"].toMap();
for(int section = FIRST_COLUMN; section < columnCount(); section++) for(int section = FIRST_COLUMN; section < columnCount(); section++)
{ {
if (!m_Columns.contains(section)) if (!IsColumnEnabled(section))
continue; // ignore columns which are hidden continue; // ignore columns which are hidden
QVariant Value = Cur[m_ColumnKeys.at(section).second]; QVariant Value = Cur[m_ColumnKeys.at(section).second];

View File

@ -83,20 +83,20 @@ public:
bool IsColumnEnabled(int column) bool IsColumnEnabled(int column)
{ {
return m_Columns.contains(column); return !m_ColumnsOff.contains(column);
} }
void SetColumnEnabled(int column, bool set) void SetColumnEnabled(int column, bool set)
{ {
if (!set) if (!set)
m_Columns.remove(column); m_ColumnsOff.insert(column);
else else
m_Columns.insert(column); m_ColumnsOff.remove(column);
} }
protected: protected:
QSet<int> m_Columns; QSet<int> m_ColumnsOff;
}; };
class MISCHELPERS_EXPORT QTreeViewEx: public QTreeView class MISCHELPERS_EXPORT QTreeViewEx: public QTreeView

View File

@ -69,7 +69,7 @@ QList<QModelIndex> CMonitorModel::Sync(const QMap<QString, CMonitorEntryPtr>& En
for (int section = 0; section < columnCount(); section++) for (int section = 0; section < columnCount(); section++)
{ {
if (!m_Columns.contains(section)) if (!IsColumnEnabled(section))
continue; // ignore columns which are hidden continue; // ignore columns which are hidden
QVariant Value; QVariant Value;

View File

@ -289,7 +289,7 @@ QList<QVariant> CSbieModel::Sync(const QMap<QString, CSandBoxPtr>& BoxList, cons
for(int section = 0; section < columnCount(); section++) for(int section = 0; section < columnCount(); section++)
{ {
if (!m_Columns.contains(section)) if (!IsColumnEnabled(section))
continue; // ignore columns which are hidden continue; // ignore columns which are hidden
QVariant Value; QVariant Value;
@ -413,7 +413,7 @@ bool CSbieModel::Sync(const CSandBoxPtr& pBox, const QList<QVariant>& Path, cons
for (int section = 0; section < columnCount(); section++) for (int section = 0; section < columnCount(); section++)
{ {
if (!m_Columns.contains(section)) if (!IsColumnEnabled(section))
continue; // ignore columns which are hidden continue; // ignore columns which are hidden
QVariant Value; QVariant Value;

View File

@ -112,15 +112,12 @@ CSbieView::CSbieView(QWidget* parent) : CPanelView(parent)
CreateTrayMenu(); CreateTrayMenu();
QByteArray Columns = theConf->GetBlob("MainWindow/BoxTree_Columns"); QByteArray Columns = theConf->GetBlob("MainWindow/BoxTree_Columns");
if (Columns.isEmpty()) if (Columns.isEmpty()) {
{
m_pSbieTree->OnResetColumns();
m_pSbieTree->setColumnWidth(0, 300); m_pSbieTree->setColumnWidth(0, 300);
m_pSbieTree->setColumnWidth(1, 70); m_pSbieTree->setColumnWidth(1, 70);
m_pSbieTree->setColumnWidth(2, 70); m_pSbieTree->setColumnWidth(2, 70);
m_pSbieTree->setColumnWidth(3, 70); m_pSbieTree->setColumnWidth(3, 70);
} } else
else
m_pSbieTree->restoreState(Columns); m_pSbieTree->restoreState(Columns);
if (theConf->GetBool("MainWindow/BoxTree_UseOrder", false) || iViewMode == 2) if (theConf->GetBool("MainWindow/BoxTree_UseOrder", false) || iViewMode == 2)
SetCustomOrder(); SetCustomOrder();

View File

@ -126,8 +126,6 @@ CTraceTree::CTraceTree(QWidget* parent)
QByteArray Columns = theConf->GetBlob("MainWindow/TraceLog_Columns"); QByteArray Columns = theConf->GetBlob("MainWindow/TraceLog_Columns");
if (!Columns.isEmpty()) if (!Columns.isEmpty())
((QTreeViewEx*)GetView())->restoreState(Columns); ((QTreeViewEx*)GetView())->restoreState(Columns);
else
((QTreeViewEx*)GetView())->OnResetColumns();
QByteArray Split = theConf->GetBlob("MainWindow/TraceSplitter"); QByteArray Split = theConf->GetBlob("MainWindow/TraceSplitter");
if(!Split.isEmpty()) if(!Split.isEmpty())
@ -219,8 +217,6 @@ CMonitorList::CMonitorList(QWidget* parent)
QByteArray Columns = theConf->GetBlob("MainWindow/Monitor_Columns"); QByteArray Columns = theConf->GetBlob("MainWindow/Monitor_Columns");
if (!Columns.isEmpty()) if (!Columns.isEmpty())
((QTreeViewEx*)GetView())->restoreState(Columns); ((QTreeViewEx*)GetView())->restoreState(Columns);
else
((QTreeViewEx*)GetView())->OnResetColumns();
} }
CMonitorList::~CMonitorList() CMonitorList::~CMonitorList()