Fixed rendering of warning and legend textures (due to newer wxWidgets)

This commit is contained in:
Enrico Turri 2018-10-25 15:32:35 +02:00
parent 3f9fb575b8
commit 321322b17a
2 changed files with 3 additions and 21 deletions

View file

@ -2424,17 +2424,12 @@ bool GLCanvas3D::WarningTexture::generate(const std::string& msg)
// generates bitmap
wxBitmap bitmap(m_width, m_height);
#if defined(__APPLE__) || defined(_MSC_VER)
bitmap.UseAlpha();
#endif
memDC.SelectObject(bitmap);
memDC.SetBackground(wxBrush(wxColour(Background_Color[0], Background_Color[1], Background_Color[2])));
memDC.Clear();
memDC.SetTextForeground(*wxWHITE);
// draw message
memDC.SetTextForeground(*wxWHITE);
memDC.DrawText(msg, 0, 0);
memDC.SelectObject(wxNullBitmap);
@ -2561,17 +2556,12 @@ bool GLCanvas3D::LegendTexture::generate(const GCodePreviewData& preview_data, c
// generates bitmap
wxBitmap bitmap(m_width, m_height);
#if defined(__APPLE__) || defined(_MSC_VER)
bitmap.UseAlpha();
#endif
memDC.SelectObject(bitmap);
memDC.SetBackground(wxBrush(wxColour(Background_Color[0], Background_Color[1], Background_Color[2])));
memDC.Clear();
memDC.SetTextForeground(*wxWHITE);
// draw title
memDC.SetTextForeground(*wxWHITE);
int title_x = Px_Border;
int title_y = Px_Border;
memDC.DrawText(title, title_x, title_y);

View file

@ -813,7 +813,6 @@ struct Plater::priv
void reload_from_disk();
void export_object_stl();
void fix_through_netfabb();
void item_changed_selection();
void on_notebook_changed(wxBookCtrlEvent&);
void on_select_preset(wxCommandEvent&);
@ -1747,11 +1746,6 @@ void Plater::priv::fix_through_netfabb()
*/
}
void Plater::priv::item_changed_selection()
{
// TODO
}
void Plater::priv::on_notebook_changed(wxBookCtrlEvent&)
{
const auto current_id = notebook->GetCurrentPage()->GetId();
@ -1924,7 +1918,6 @@ void Plater::priv::on_action_selectbyparts(SimpleEvent&)
void Plater::priv::on_object_select(SimpleEvent& evt)
{
selection_changed();
item_changed_selection();
wxGetApp().obj_list()->update_selections();
}
#else
@ -1936,8 +1929,7 @@ void Plater::priv::on_object_select(ObjectSelectEvent &evt)
if (obj_idx >= 0 && obj_idx < 1000 && vol_idx == -1) {
// Ignore the special objects (the wipe tower proxy and such).
select_object(obj_idx);
item_changed_selection();
}
}
}
#endif // ENABLE_EXTENDED_SELECTION