GCodeViewer -> Do not show modifier shells
This commit is contained in:
parent
eb215fe994
commit
2a90cd2849
1 changed files with 27 additions and 12 deletions
|
@ -282,6 +282,9 @@ void GCodeViewer::load(const GCodeProcessor::Result& gcode_result, const Print&
|
|||
reset();
|
||||
|
||||
load_toolpaths(gcode_result);
|
||||
#if ENABLE_GCODE_VIEWER_AS_STATE
|
||||
if (wxGetApp().mainframe->get_mode() != MainFrame::EMode::GCodeViewer)
|
||||
#endif // ENABLE_GCODE_VIEWER_AS_STATE
|
||||
load_shells(print, initialized);
|
||||
|
||||
#if ENABLE_GCODE_VIEWER_AS_STATE
|
||||
|
@ -684,6 +687,18 @@ void GCodeViewer::load_shells(const Print& print, bool initialized)
|
|||
}
|
||||
}
|
||||
|
||||
// remove modifiers
|
||||
while (true) {
|
||||
GLVolumePtrs::iterator it = std::find_if(m_shells.volumes.volumes.begin(), m_shells.volumes.volumes.end(), [](GLVolume* volume) { return volume->is_modifier; });
|
||||
if (it != m_shells.volumes.volumes.end())
|
||||
{
|
||||
delete (*it);
|
||||
m_shells.volumes.volumes.erase(it);
|
||||
}
|
||||
else
|
||||
break;
|
||||
}
|
||||
|
||||
for (GLVolume* volume : m_shells.volumes.volumes)
|
||||
{
|
||||
volume->zoom_to_volumes = false;
|
||||
|
|
Loading…
Add table
Reference in a new issue