Skip to content

Commit 244e257

Browse files
committed
use old max_width and max_height in text migration if available
1 parent 13aa961 commit 244e257

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

editor/src/messages/portfolio/document_migration.rs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -435,12 +435,20 @@ pub fn document_migration_upgrades(document: &mut DocumentMessageHandler, reset_
435435
);
436436
document.network_interface.set_input(
437437
&InputConnector::node(*node_id, 6),
438-
NodeInput::value(TaggedValue::OptionalF64(TypesettingConfig::default().max_width), false),
438+
if inputs_count >= 7 {
439+
old_inputs[6].clone()
440+
} else {
441+
NodeInput::value(TaggedValue::OptionalF64(TypesettingConfig::default().max_width), false)
442+
},
439443
network_path,
440444
);
441445
document.network_interface.set_input(
442446
&InputConnector::node(*node_id, 7),
443-
NodeInput::value(TaggedValue::OptionalF64(TypesettingConfig::default().max_height), false),
447+
if inputs_count >= 8 {
448+
old_inputs[7].clone()
449+
} else {
450+
NodeInput::value(TaggedValue::OptionalF64(TypesettingConfig::default().max_height), false)
451+
},
444452
network_path,
445453
);
446454
document.network_interface.insert_input_properties_row(

0 commit comments

Comments
 (0)