MagicSetEditor2 icon indicating copy to clipboard operation
MagicSetEditor2 copied to clipboard

Inconsistent value for `card_style.field.content_height`

Open ronelm2000 opened this issue 4 years ago • 1 comments

There is an issue with card_style.field.content_height being inconsistent (migrating from MSE 2.0.2), until either a new card is loaded (but it's still incorrect) or the field's card text value is modified (after which the correct value will be displayed).

image

This causes height computations to go awry like this: Incorrect Correct (For context, content_height is used to create a bottom-up text box for MSE's Weiss Schwarz plugin)

This would have been fine (with a workaround), but this also negatively affects when exporting all cards.

This is caused likely by card_style likely being a set variable (set.stylesheet.card_style.field.content_height?) instead of a card variable (and thus requiring a UI cycle to update the value). I tried to look into card_style.field.layout but I can't find documentation for this.

A workaround or a migration path would be greatly appreciated.

OS: Windows 10 MSE version: 2.1.2 and 2.1.1 (x32 / x64) Templates installed: MSE Weiss Schwarz Plugin ( https://github.com/ronelm2000/weiss-mse-plugin )

ronelm2000 avatar Aug 01 '21 11:08 ronelm2000

Temporary Workaround Found: Use something akin to card_style.field.content_lines * line_height instead (assuming you do not use the new <margins> or hard/soft lines. (Could be expanded to include margins, paragraphs, etc. with layout and line_height_soft, line_height_hard, line_height_line, etc.)

This only works for WS plugin currently because it does not use those yet.

ronelm2000 avatar Aug 03 '21 01:08 ronelm2000