Skip to content

Commit

Permalink
Follow-up of 6b04142 - Fixed typo due to missing code edit after copy…
Browse files Browse the repository at this point in the history
… and paste
  • Loading branch information
enricoturri1966 committed Feb 8, 2022
1 parent 8ada191 commit a74bea5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/slic3r/GUI/3DBed.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -701,7 +701,9 @@ void Bed3D::render_default(bool bottom, bool picking)
glsafe(::glEnable(GL_BLEND));
glsafe(::glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA));

if (m_model.get_filename().empty() && !bottom) {
const bool has_model = !m_model.get_filename().empty();

if (!has_model && !bottom) {
// draw background
glsafe(::glDepthMask(GL_FALSE));
m_triangles.set_color(picking ? PICKING_MODEL_COLOR : DEFAULT_MODEL_COLOR);
Expand All @@ -712,7 +714,7 @@ void Bed3D::render_default(bool bottom, bool picking)
if (!picking) {
// draw grid
glsafe(::glLineWidth(1.5f * m_scale_factor));
m_gridlines.set_color(picking ? DEFAULT_SOLID_GRID_COLOR : DEFAULT_TRANSPARENT_GRID_COLOR);
m_gridlines.set_color(has_model && !bottom ? DEFAULT_SOLID_GRID_COLOR : DEFAULT_TRANSPARENT_GRID_COLOR);
m_gridlines.render();
}

Expand Down

0 comments on commit a74bea5

Please sign in to comment.