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:
enricoturri1966 2022-08-25 14:10:59 +02:00
parent 4e188c71c3
commit ac36b861f1
4 changed files with 13 additions and 4 deletions

View File

@ -1328,6 +1328,15 @@ void ObjectManipulation::set_coordinates_type(ECoordinatesType type)
canvas->set_as_dirty();
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
void ObjectManipulation::msw_rescale()

View File

@ -207,7 +207,7 @@ public:
bool get_uniform_scaling() const { return m_uniform_scale; }
#if ENABLE_WORLD_COORDINATE
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_instance_coordinates() const { return m_coordinates_type == ECoordinatesType::Instance; }
bool is_local_coordinates() const { return m_coordinates_type == ECoordinatesType::Local; }

View File

@ -30,6 +30,7 @@ public:
virtual wxSizer* get_sizer();
ConfigOptionsGroup* get_og() { return m_og.get(); }
const ConfigOptionsGroup* get_og() const { return m_og.get(); }
wxWindow* parent() const {return m_parent; }
};

View File

@ -176,9 +176,8 @@ public:
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 set_name(const wxString& new_name) {
stb->SetLabel(new_name);
}
void set_name(const wxString& 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 disable() { for (auto& field : m_fields) field.second->disable(); }