Fix menclature tables are growing in width, when you reload them the

width increases.
This commit is contained in:
Laurent Trinques
2025-02-27 11:29:29 +01:00
parent adbbeca905
commit 6b9837b244
2 changed files with 10 additions and 5 deletions

View File

@@ -1001,11 +1001,16 @@ void QetGraphicsTableItem::adjustColumnsWidth()
m_header_item->minimumSectionWidth().at(at_b))+b); m_header_item->minimumSectionWidth().at(at_b))+b);
sum_+= m_header_item->sectionSize(i); sum_+= m_header_item->sectionSize(i);
#else #else
#if TODO_LIST auto at_a = std::min(m_minimum_column_width.size()-1, (qsizetype) i); //In case of the I is higher than m_minimum_column_width or
#pragma message("@TODO remove code for QT 6 or later") auto at_b = std::min(m_header_item->minimumSectionWidth().size()-1,(qsizetype) i); //m_header_item->minimumSectionWidth().size()
#endif m_header_item->resizeSection(
qDebug()<<"Help code for QT 6 or later"; i,
std::max(
m_minimum_column_width.at(at_a),
m_header_item->minimumSectionWidth().at(at_b))+b);
sum_+= m_header_item->sectionSize(i);
#endif #endif
} }