Skip to content

Commit c9f41b6

Browse files
DRKV333tordex
authored andcommitted
Fixed max violations not freezing
1 parent d036931 commit c9f41b6

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed

src/flex_line.cpp

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -238,20 +238,17 @@ bool litehtml::flex_line::fix_min_max_violations()
238238
? flex_clamp_state_min_violation
239239
: flex_clamp_state_max_violation;
240240

241-
if (total_violation > 0)
241+
for (auto& item : items)
242242
{
243-
for (auto& item : items)
243+
if (!item->frozen)
244244
{
245-
if (!item->frozen)
245+
if (item->clamp_state == state_to_freeze)
246246
{
247-
if (item->clamp_state == state_to_freeze)
248-
{
249-
item->frozen = true;
250-
} else
251-
{
252-
all_frozen = false;
253-
item->clamp_state = flex_clamp_state_unclamped;
254-
}
247+
item->frozen = true;
248+
} else
249+
{
250+
all_frozen = false;
251+
item->clamp_state = flex_clamp_state_unclamped;
255252
}
256253
}
257254
}

0 commit comments

Comments
 (0)