Fixed rendering of warning and legend textures (due to newer wxWidgets)
This commit is contained in:
parent
3f9fb575b8
commit
321322b17a
2 changed files with 3 additions and 21 deletions
|
@ -2424,17 +2424,12 @@ bool GLCanvas3D::WarningTexture::generate(const std::string& msg)
|
||||||
// generates bitmap
|
// generates bitmap
|
||||||
wxBitmap bitmap(m_width, m_height);
|
wxBitmap bitmap(m_width, m_height);
|
||||||
|
|
||||||
#if defined(__APPLE__) || defined(_MSC_VER)
|
|
||||||
bitmap.UseAlpha();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
memDC.SelectObject(bitmap);
|
memDC.SelectObject(bitmap);
|
||||||
memDC.SetBackground(wxBrush(wxColour(Background_Color[0], Background_Color[1], Background_Color[2])));
|
memDC.SetBackground(wxBrush(wxColour(Background_Color[0], Background_Color[1], Background_Color[2])));
|
||||||
memDC.Clear();
|
memDC.Clear();
|
||||||
|
|
||||||
memDC.SetTextForeground(*wxWHITE);
|
|
||||||
|
|
||||||
// draw message
|
// draw message
|
||||||
|
memDC.SetTextForeground(*wxWHITE);
|
||||||
memDC.DrawText(msg, 0, 0);
|
memDC.DrawText(msg, 0, 0);
|
||||||
|
|
||||||
memDC.SelectObject(wxNullBitmap);
|
memDC.SelectObject(wxNullBitmap);
|
||||||
|
@ -2561,17 +2556,12 @@ bool GLCanvas3D::LegendTexture::generate(const GCodePreviewData& preview_data, c
|
||||||
// generates bitmap
|
// generates bitmap
|
||||||
wxBitmap bitmap(m_width, m_height);
|
wxBitmap bitmap(m_width, m_height);
|
||||||
|
|
||||||
#if defined(__APPLE__) || defined(_MSC_VER)
|
|
||||||
bitmap.UseAlpha();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
memDC.SelectObject(bitmap);
|
memDC.SelectObject(bitmap);
|
||||||
memDC.SetBackground(wxBrush(wxColour(Background_Color[0], Background_Color[1], Background_Color[2])));
|
memDC.SetBackground(wxBrush(wxColour(Background_Color[0], Background_Color[1], Background_Color[2])));
|
||||||
memDC.Clear();
|
memDC.Clear();
|
||||||
|
|
||||||
memDC.SetTextForeground(*wxWHITE);
|
|
||||||
|
|
||||||
// draw title
|
// draw title
|
||||||
|
memDC.SetTextForeground(*wxWHITE);
|
||||||
int title_x = Px_Border;
|
int title_x = Px_Border;
|
||||||
int title_y = Px_Border;
|
int title_y = Px_Border;
|
||||||
memDC.DrawText(title, title_x, title_y);
|
memDC.DrawText(title, title_x, title_y);
|
||||||
|
|
|
@ -813,7 +813,6 @@ struct Plater::priv
|
||||||
void reload_from_disk();
|
void reload_from_disk();
|
||||||
void export_object_stl();
|
void export_object_stl();
|
||||||
void fix_through_netfabb();
|
void fix_through_netfabb();
|
||||||
void item_changed_selection();
|
|
||||||
|
|
||||||
void on_notebook_changed(wxBookCtrlEvent&);
|
void on_notebook_changed(wxBookCtrlEvent&);
|
||||||
void on_select_preset(wxCommandEvent&);
|
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&)
|
void Plater::priv::on_notebook_changed(wxBookCtrlEvent&)
|
||||||
{
|
{
|
||||||
const auto current_id = notebook->GetCurrentPage()->GetId();
|
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)
|
void Plater::priv::on_object_select(SimpleEvent& evt)
|
||||||
{
|
{
|
||||||
selection_changed();
|
selection_changed();
|
||||||
item_changed_selection();
|
|
||||||
wxGetApp().obj_list()->update_selections();
|
wxGetApp().obj_list()->update_selections();
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
@ -1936,8 +1929,7 @@ void Plater::priv::on_object_select(ObjectSelectEvent &evt)
|
||||||
if (obj_idx >= 0 && obj_idx < 1000 && vol_idx == -1) {
|
if (obj_idx >= 0 && obj_idx < 1000 && vol_idx == -1) {
|
||||||
// Ignore the special objects (the wipe tower proxy and such).
|
// Ignore the special objects (the wipe tower proxy and such).
|
||||||
select_object(obj_idx);
|
select_object(obj_idx);
|
||||||
item_changed_selection();
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
#endif // ENABLE_EXTENDED_SELECTION
|
#endif // ENABLE_EXTENDED_SELECTION
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue