Fix after merge

This commit is contained in:
Filip Sykala - NTB T15p 2023-08-10 12:36:56 +02:00
parent 14b22e7310
commit 33e07c6dd5
2 changed files with 12 additions and 6 deletions

View File

@ -1936,8 +1936,8 @@ void align_shape(ExPolygonsWithIds &shapes, const std::wstring &text, const Font
// Speed up for left aligned text // Speed up for left aligned text
if (prop.align.first == FontProp::HorizontalAlign::left){ if (prop.align.first == FontProp::HorizontalAlign::left){
// already horizontaly aligned // already horizontaly aligned
for (ExPolygons shape : shapes) for (ExPolygonsWithId& shape : shapes)
for (ExPolygon &s : shape) for (ExPolygon &s : shape.expoly)
s.translate(Point(0, y_offset)); s.translate(Point(0, y_offset));
return; return;
} }

View File

@ -590,17 +590,23 @@ void GLGizmoEmboss::volume_transformation_changing()
void GLGizmoEmboss::volume_transformation_changed() void GLGizmoEmboss::volume_transformation_changed()
{ {
if (m_volume == nullptr || !m_volume->text_configuration.has_value()) { if (m_volume == nullptr ||
!m_volume->text_configuration.has_value() ||
!m_volume->emboss_shape.has_value()) {
assert(false); assert(false);
return; return;
} }
const TextConfiguration &tc = *m_volume->text_configuration;
const EmbossShape &es = *m_volume->emboss_shape;
const FontProp &prop = m_volume->text_configuration->style.prop; bool per_glyph = tc.style.prop.per_glyph;
if (prop.per_glyph) if (per_glyph)
init_text_lines(m_text_lines, m_parent.get_selection(), m_style_manager, m_text_lines.get_lines().size()); init_text_lines(m_text_lines, m_parent.get_selection(), m_style_manager, m_text_lines.get_lines().size());
bool use_surface = es.projection.use_surface;
// Update surface by new position // Update surface by new position
if (prop.use_surface || prop.per_glyph) if (use_surface || per_glyph)
process(); process();
// Show correct value of height & depth inside of inputs // Show correct value of height & depth inside of inputs