This commit is contained in:
enricoturri1966 2022-12-08 10:06:24 +01:00
parent f675e4d9f6
commit 0ebabcbc8a
2 changed files with 24 additions and 16 deletions

View File

@ -125,8 +125,10 @@ ObjectManipulation::ObjectManipulation(wxWindow* parent) :
// Load bitmaps to be used for the mirroring buttons: // Load bitmaps to be used for the mirroring buttons:
m_mirror_bitmap_on = ScalableBitmap(parent, "mirroring_on"); m_mirror_bitmap_on = ScalableBitmap(parent, "mirroring_on");
#if !ENABLE_WORLD_COORDINATE
m_mirror_bitmap_off = ScalableBitmap(parent, "mirroring_off"); m_mirror_bitmap_off = ScalableBitmap(parent, "mirroring_off");
m_mirror_bitmap_hidden = ScalableBitmap(parent, "mirroring_transparent"); m_mirror_bitmap_hidden = ScalableBitmap(parent, "mirroring_transparent");
#endif // !ENABLE_WORLD_COORDINATE
const int border = wxOSX ? 0 : 4; const int border = wxOSX ? 0 : 4;
const int em = wxGetApp().em_unit(); const int em = wxGetApp().em_unit();
@ -265,12 +267,14 @@ ObjectManipulation::ObjectManipulation(wxWindow* parent) :
// We will add a button to toggle mirroring to each axis: // We will add a button to toggle mirroring to each axis:
auto btn = new ScalableButton(parent, wxID_ANY, "mirroring_off", wxEmptyString, wxDefaultSize, wxDefaultPosition, wxBU_EXACTFIT | wxNO_BORDER | wxTRANSPARENT_WINDOW); auto btn = new ScalableButton(parent, wxID_ANY, "mirroring_off", wxEmptyString, wxDefaultSize, wxDefaultPosition, wxBU_EXACTFIT | wxNO_BORDER | wxTRANSPARENT_WINDOW);
#if ENABLE_WORLD_COORDINATE
btn->SetToolTip(_L("Mirror along") + wxString::Format(_L(" %c "), (int)label) + _L("axis"));
m_mirror_buttons[axis_idx] = btn;
#else
btn->SetToolTip(wxString::Format(_L("Toggle %c axis mirroring"), (int)label)); btn->SetToolTip(wxString::Format(_L("Toggle %c axis mirroring"), (int)label));
btn->SetBitmapDisabled_(m_mirror_bitmap_hidden); btn->SetBitmapDisabled_(m_mirror_bitmap_hidden);
#if ENABLE_WORLD_COORDINATE
m_mirror_buttons[axis_idx] = btn;
#else
m_mirror_buttons[axis_idx].first = btn; m_mirror_buttons[axis_idx].first = btn;
m_mirror_buttons[axis_idx].second = mbShown; m_mirror_buttons[axis_idx].second = mbShown;
#endif // ENABLE_WORLD_COORDINATE #endif // ENABLE_WORLD_COORDINATE
@ -1442,8 +1446,10 @@ void ObjectManipulation::sys_color_changed()
editor->sys_color_changed(this); editor->sys_color_changed(this);
m_mirror_bitmap_on.sys_color_changed(); m_mirror_bitmap_on.sys_color_changed();
#if !ENABLE_WORLD_COORDINATE
m_mirror_bitmap_off.sys_color_changed(); m_mirror_bitmap_off.sys_color_changed();
m_mirror_bitmap_hidden.sys_color_changed(); m_mirror_bitmap_hidden.sys_color_changed();
#endif // !ENABLE_WORLD_COORDINATE
m_reset_scale_button->sys_color_changed(); m_reset_scale_button->sys_color_changed();
m_reset_rotation_button->sys_color_changed(); m_reset_rotation_button->sys_color_changed();
m_drop_to_bed_button->sys_color_changed(); m_drop_to_bed_button->sys_color_changed();

View File

@ -146,8 +146,10 @@ private:
// Bitmaps for the mirroring buttons. // Bitmaps for the mirroring buttons.
ScalableBitmap m_mirror_bitmap_on; ScalableBitmap m_mirror_bitmap_on;
#if !ENABLE_WORLD_COORDINATE
ScalableBitmap m_mirror_bitmap_off; ScalableBitmap m_mirror_bitmap_off;
ScalableBitmap m_mirror_bitmap_hidden; ScalableBitmap m_mirror_bitmap_hidden;
#endif // !ENABLE_WORLD_COORDINATE
// Needs to be updated from OnIdle? // Needs to be updated from OnIdle?
bool m_dirty = false; bool m_dirty = false;
@ -171,7 +173,7 @@ private:
choice_ctrl* m_word_local_combo { nullptr }; choice_ctrl* m_word_local_combo { nullptr };
ScalableBitmap m_manifold_warning_bmp; ScalableBitmap m_manifold_warning_bmp;
wxStaticBitmap* m_fix_throught_netfab_bitmap; wxStaticBitmap* m_fix_throught_netfab_bitmap{ nullptr };
#if ENABLE_WORLD_COORDINATE #if ENABLE_WORLD_COORDINATE
// Currently focused editor (nullptr if none) // Currently focused editor (nullptr if none)