Imperial units: Implemented just for the object's position and size

This commit is contained in:
YuSanka 2020-04-29 19:10:13 +02:00
parent 9fdc54bfff
commit 495db2ff2e
8 changed files with 164 additions and 27 deletions

View file

@ -41,6 +41,11 @@ private:
class ObjectManipulation : public OG_Settings
{
public:
static const double in_to_mm;
static const double mm_to_in;
private:
struct Cache
{
Vec3d position;
@ -76,6 +81,10 @@ class ObjectManipulation : public OG_Settings
wxStaticText* m_scale_Label = nullptr;
wxStaticText* m_rotate_Label = nullptr;
bool m_imperial_units { false };
wxStaticText* m_position_unit { nullptr };
wxStaticText* m_size_unit { nullptr };
wxStaticText* m_item_name = nullptr;
wxStaticText* m_empty_str = nullptr;
@ -84,6 +93,8 @@ class ObjectManipulation : public OG_Settings
ScalableButton* m_reset_rotation_button = nullptr;
ScalableButton* m_drop_to_bed_button = nullptr;
wxCheckBox* m_check_inch {nullptr};
// Mirroring buttons and their current state
enum MirrorButtonState {
mbHidden,
@ -138,6 +149,7 @@ public:
void Show(const bool show) override;
bool IsShown() override;
void UpdateAndShow(const bool show) override;
void update_ui_from_settings();
void set_dirty() { m_dirty = true; }
// Called from the App to update the UI if dirty.