|
From: <cn...@us...> - 2023-07-28 04:54:44
|
Revision: 1414
http://sourceforge.net/p/seq/svn/1414
Author: cn187
Date: 2023-07-28 04:54:43 +0000 (Fri, 28 Jul 2023)
Log Message:
-----------
Fix hiding columns with last column stretch enabled
Modified Paths:
--------------
showeq/branches/cn187_devel/src/seqlistview.cpp
Modified: showeq/branches/cn187_devel/src/seqlistview.cpp
===================================================================
--- showeq/branches/cn187_devel/src/seqlistview.cpp 2023-07-28 04:49:49 UTC (rev 1413)
+++ showeq/branches/cn187_devel/src/seqlistview.cpp 2023-07-28 04:54:43 UTC (rev 1414)
@@ -51,8 +51,6 @@
setSelectionMode(QAbstractItemView::SingleSelection);
setSelectionBehavior(QAbstractItemView::SelectRows);
- // don't stretch the last column, otherwise we can't hide it
- header()->setStretchLastSection(false);
#if (QT_VERSION >= QT_VERSION_CHECK(5,11,0))
header()->setFirstSectionMovable(true);
#endif
@@ -146,7 +144,7 @@
{
columnName = columnPreferenceName(i);
width = columnWidth(i);
- if (width != 0)
+ if (!header()->isSectionHidden(i) && width != 0)
{
pSEQPrefs->setPrefInt(columnName + "Width", preferenceName(), width);
pSEQPrefs->setPrefBool(show + columnName, preferenceName(), true);
@@ -214,6 +212,7 @@
#endif
header()->resizeSection(i, width);
setColumnWidth(i, width);
+ header()->setSectionHidden(i, false);
}
else
{
@@ -225,6 +224,7 @@
#endif
header()->resizeSection(i, 0);
setColumnWidth(i, 0);
+ header()->setSectionHidden(i, true);
}
}
@@ -286,6 +286,9 @@
header()->resizeSection(column, width);
setColumnWidth(column, width);
+ header()->setSectionHidden(column, !visible);
+
+
// set the the preferences as to if the column is shown
pSEQPrefs->setPrefBool(QString("Show") + columnName, preferenceName(),
(width != 0));
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|