mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 16:57:31 +01:00
[apps/sequence/sequence] Do not memoize nameLayout
Fixes the following bug: In the graph tab of the Sequence app, compute the sum of the terms of a sequence from 1 to 9 and then from 1 to 10. The Layout is memoized after the first time and mispositioned the second time since it is not recomputed.
This commit is contained in:
committed by
LeaNumworks
parent
c1215063ee
commit
fccd72b757
@@ -28,7 +28,6 @@ void Sequence::tidy() {
|
||||
m_firstInitialCondition.tidyName();
|
||||
m_secondInitialCondition.tidy();
|
||||
m_secondInitialCondition.tidyName();
|
||||
m_nameLayout = Layout();
|
||||
}
|
||||
|
||||
Sequence::Type Sequence::type() const {
|
||||
@@ -81,13 +80,10 @@ void Sequence::setInitialRank(int rank) {
|
||||
}
|
||||
|
||||
Poincare::Layout Sequence::nameLayout() {
|
||||
if (m_nameLayout.isUninitialized()) {
|
||||
m_nameLayout = HorizontalLayout::Builder(
|
||||
CodePointLayout::Builder(fullName()[0], KDFont::SmallFont),
|
||||
VerticalOffsetLayout::Builder(CodePointLayout::Builder(symbol(), KDFont::SmallFont), VerticalOffsetLayoutNode::Position::Subscript)
|
||||
);
|
||||
}
|
||||
return m_nameLayout;
|
||||
return HorizontalLayout::Builder(
|
||||
CodePointLayout::Builder(fullName()[0], KDFont::SmallFont),
|
||||
VerticalOffsetLayout::Builder(CodePointLayout::Builder(symbol(), KDFont::SmallFont), VerticalOffsetLayoutNode::Position::Subscript)
|
||||
);
|
||||
}
|
||||
|
||||
bool Sequence::isDefined() {
|
||||
|
||||
Reference in New Issue
Block a user