| Summary: | column size is not the same after saving and reopening the project | ||
|---|---|---|---|
| Product: | [Applications] calligraplan | Reporter: | miko <mickael.sergent> |
| Component: | usability | Assignee: | Dag Andersen <dag.andersen> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | ||
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Other | ||
| OS: | Linux | ||
| Latest Commit: | https://invent.kde.org/office/calligraplan/-/commit/bf1d0f68ebe7b3a89c6c844e683896434bfd9c24 | Version Fixed/Implemented In: | |
| Sentry Crash Report: | |||
|
Description
miko
2024-11-30 18:18:53 UTC
it seems issue come from wrong index used to stored size, view index is used instead of logicial
Here a possible fix:
diff --git a/src/libs/ui/kptviewbase.cpp b/src/libs/ui/kptviewbase.cpp
index ceff8fe3..82399d97 100644
--- a/src/libs/ui/kptviewbase.cpp
+++ b/src/libs/ui/kptviewbase.cpp
@@ -1790,7 +1790,7 @@ void TreeViewBase::saveContext(const QMetaEnum &map, QDomElement &element, bool
QString n = QLatin1String(map.key(h->logicalIndex(i)));
if (! n.isEmpty()) {
e.setAttribute(QStringLiteral("section-%1").arg(i), n);
- e.setAttribute(QStringLiteral("size-%1").arg(i), h->sectionSize(h->logicalIndex(i)));
+ e.setAttribute(QStringLiteral("size-%1").arg(h->logicalIndex(i)), h->sectionSize(h->logicalIndex(i)));
}
}
}
Git commit bf1d0f68ebe7b3a89c6c844e683896434bfd9c24 by Albert Astals Cid, on behalf of Mickael Sergent. Committed on 17/12/2025 at 22:15. Pushed by aacid into branch 'master'. M +1 -1 src/libs/ui/kptviewbase.cpp https://invent.kde.org/office/calligraplan/-/commit/bf1d0f68ebe7b3a89c6c844e683896434bfd9c24 |