mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
TableHeaderComponent: Avoid repainting in setColumnWidth if requested size is outside limits
This commit is contained in:
parent
d13a23ad14
commit
32322a51e8
1 changed files with 4 additions and 3 deletions
|
|
@ -174,12 +174,13 @@ void TableHeaderComponent::setColumnWidth (const int columnId, const int newWidt
|
|||
{
|
||||
if (auto* ci = getInfoForId (columnId))
|
||||
{
|
||||
if (ci->width != newWidth)
|
||||
const auto newWidthToUse = jlimit (ci->minimumWidth, ci->maximumWidth, newWidth);
|
||||
|
||||
if (ci->width != newWidthToUse)
|
||||
{
|
||||
auto numColumns = getNumColumns (true);
|
||||
|
||||
ci->lastDeliberateWidth = ci->width
|
||||
= jlimit (ci->minimumWidth, ci->maximumWidth, newWidth);
|
||||
ci->lastDeliberateWidth = ci->width = newWidthToUse;
|
||||
|
||||
if (stretchToFit)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue