Remove unnecessary GenerateAll/ZoomToFit calls in AfterNewFile.

These were useful before because chord tolerance depended on the zoom
level; and so the first generation produced a crude mesh used to
set the zoom level, and the second actually did useful work.
Chord tolerance is now independent of the zoom level, so this code
is no longer useful.
pull/97/head
whitequark 2016-10-12 23:15:15 +00:00
parent 62f5f690c1
commit ea52fcbce1
1 changed files with 1 additions and 10 deletions

View File

@ -317,7 +317,7 @@ void SolveSpaceUI::AfterNewFile() {
SS.GW.projRight = Vector::From(1, 0, 0);
SS.GW.projUp = Vector::From(0, 1, 0);
GenerateAll(Generate::REGEN);
GenerateAll(Generate::ALL);
TW.Init();
GW.Init();
@ -329,15 +329,6 @@ void SolveSpaceUI::AfterNewFile() {
GW.width = w;
GW.height = h;
// The triangles haven't been generated yet, but zoom to fit the entities
// roughly in the window, since that sets the mesh tolerance. Consider
// invisible entities, so we still get something reasonable if the only
// thing visible is the not-yet-generated surfaces.
GW.ZoomToFit(/*includingInvisibles=*/true);
GenerateAll(Generate::ALL);
SS.ScheduleShowTW();
// Then zoom to fit again, to fit the triangles
GW.ZoomToFit(/*includingInvisibles=*/false);
// Create all the default styles; they'll get created on the fly anyways,