mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-07-14 05:51:47 +08:00
SPE-1276 - Tech ENABLE_WORLD_COORDINATE - Fixed selection bounding box when selecting multiple instances of an object while the local coordinate system is active
This commit is contained in:
parent
4e188c71c3
commit
ac36b861f1
@ -1328,6 +1328,15 @@ void ObjectManipulation::set_coordinates_type(ECoordinatesType type)
|
|||||||
canvas->set_as_dirty();
|
canvas->set_as_dirty();
|
||||||
canvas->request_extra_frame();
|
canvas->request_extra_frame();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ECoordinatesType ObjectManipulation::get_coordinates_type() const
|
||||||
|
{
|
||||||
|
const wxString og_name = get_og()->get_name();
|
||||||
|
if (og_name.Contains(_L("Group manipulation")))
|
||||||
|
return ECoordinatesType::World;
|
||||||
|
|
||||||
|
return m_coordinates_type;
|
||||||
|
}
|
||||||
#endif // ENABLE_WORLD_COORDINATE
|
#endif // ENABLE_WORLD_COORDINATE
|
||||||
|
|
||||||
void ObjectManipulation::msw_rescale()
|
void ObjectManipulation::msw_rescale()
|
||||||
|
@ -207,7 +207,7 @@ public:
|
|||||||
bool get_uniform_scaling() const { return m_uniform_scale; }
|
bool get_uniform_scaling() const { return m_uniform_scale; }
|
||||||
#if ENABLE_WORLD_COORDINATE
|
#if ENABLE_WORLD_COORDINATE
|
||||||
void set_coordinates_type(ECoordinatesType type);
|
void set_coordinates_type(ECoordinatesType type);
|
||||||
ECoordinatesType get_coordinates_type() const { return m_coordinates_type; }
|
ECoordinatesType get_coordinates_type() const;
|
||||||
bool is_world_coordinates() const { return m_coordinates_type == ECoordinatesType::World; }
|
bool is_world_coordinates() const { return m_coordinates_type == ECoordinatesType::World; }
|
||||||
bool is_instance_coordinates() const { return m_coordinates_type == ECoordinatesType::Instance; }
|
bool is_instance_coordinates() const { return m_coordinates_type == ECoordinatesType::Instance; }
|
||||||
bool is_local_coordinates() const { return m_coordinates_type == ECoordinatesType::Local; }
|
bool is_local_coordinates() const { return m_coordinates_type == ECoordinatesType::Local; }
|
||||||
|
@ -30,6 +30,7 @@ public:
|
|||||||
|
|
||||||
virtual wxSizer* get_sizer();
|
virtual wxSizer* get_sizer();
|
||||||
ConfigOptionsGroup* get_og() { return m_og.get(); }
|
ConfigOptionsGroup* get_og() { return m_og.get(); }
|
||||||
|
const ConfigOptionsGroup* get_og() const { return m_og.get(); }
|
||||||
wxWindow* parent() const {return m_parent; }
|
wxWindow* parent() const {return m_parent; }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -176,9 +176,8 @@ public:
|
|||||||
void show_field(const t_config_option_key& opt_key, bool show = true);
|
void show_field(const t_config_option_key& opt_key, bool show = true);
|
||||||
void hide_field(const t_config_option_key& opt_key) { show_field(opt_key, false); }
|
void hide_field(const t_config_option_key& opt_key) { show_field(opt_key, false); }
|
||||||
|
|
||||||
void set_name(const wxString& new_name) {
|
void set_name(const wxString& new_name) { stb->SetLabel(new_name); }
|
||||||
stb->SetLabel(new_name);
|
wxString get_name() const { return stb->GetLabel(); }
|
||||||
}
|
|
||||||
|
|
||||||
inline void enable() { for (auto& field : m_fields) field.second->enable(); }
|
inline void enable() { for (auto& field : m_fields) field.second->enable(); }
|
||||||
inline void disable() { for (auto& field : m_fields) field.second->disable(); }
|
inline void disable() { for (auto& field : m_fields) field.second->disable(); }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user