ENH: sync some change in gcode viewer

Improve the loading speed of gcode preview

Signed-off-by: salt.wei <salt.wei@bambulab.com>
Change-Id: I9cf4b32f10753e1bc1d9b109557b995d5f3fd549
This commit is contained in:
salt.wei 2023-01-10 13:10:03 +08:00 committed by Lane.Wei
parent 3291a452da
commit 3d48e2dc55
2 changed files with 22 additions and 20 deletions

View file

@ -466,9 +466,8 @@ class GCodeViewer
size_t first{ 0 };
size_t last{ 0 };
bool operator == (const Endpoints& other) const {
return first == other.first && last == other.last;
}
bool operator == (const Endpoints& other) const { return first == other.first && last == other.last; }
bool operator != (const Endpoints& other) const { return !operator==(other); }
};
private:
@ -497,9 +496,8 @@ class GCodeViewer
bool operator != (const Layers& other) const {
if (m_zs != other.m_zs)
return true;
if (!(m_endpoints == other.m_endpoints))
if (m_endpoints != other.m_endpoints)
return true;
return false;
}
};