Allowe edit text objects in simple mode

This commit is contained in:
Filip Sykala - NTB T15p 2023-04-04 13:18:55 +02:00
parent 10a85c10a5
commit c6d5013e9a
2 changed files with 2 additions and 6 deletions

View File

@ -246,7 +246,7 @@ void GLGizmoEmboss::create_volume(ModelVolumeType volume_type, const Vec2d& mous
if (!init_create(volume_type)) if (!init_create(volume_type))
return; return;
GLVolume *gl_volume = get_first_hovered_gl_volume(m_parent); const GLVolume *gl_volume = get_first_hovered_gl_volume(m_parent);
DataBase emboss_data = priv::create_emboss_data_base(m_text, m_style_manager, m_job_cancel); DataBase emboss_data = priv::create_emboss_data_base(m_text, m_style_manager, m_job_cancel);
if (gl_volume != nullptr) { if (gl_volume != nullptr) {
// Try to cast ray into scene and find object for add volume // Try to cast ray into scene and find object for add volume
@ -558,10 +558,6 @@ bool GLGizmoEmboss::on_init()
return true; return true;
} }
bool GLGizmoEmboss::on_is_activable() const {
return wxGetApp().get_mode() != comSimple;
}
std::string GLGizmoEmboss::on_get_name() const { return _u8L("Emboss"); } std::string GLGizmoEmboss::on_get_name() const { return _u8L("Emboss"); }
void GLGizmoEmboss::on_render() { void GLGizmoEmboss::on_render() {

View File

@ -53,13 +53,13 @@ public:
void on_shortcut_key(); void on_shortcut_key();
protected: protected:
bool on_init() override; bool on_init() override;
bool on_is_activable() const override;
std::string on_get_name() const override; std::string on_get_name() const override;
void on_render() override; void on_render() override;
void on_register_raycasters_for_picking() override; void on_register_raycasters_for_picking() override;
void on_unregister_raycasters_for_picking() override; void on_unregister_raycasters_for_picking() override;
void on_render_input_window(float x, float y, float bottom_limit) override; void on_render_input_window(float x, float y, float bottom_limit) override;
bool on_is_selectable() const override { return false; } bool on_is_selectable() const override { return false; }
bool on_is_activable() const override { return true; };
void on_set_state() override; void on_set_state() override;
void data_changed(bool is_serializing) override; // selection changed void data_changed(bool is_serializing) override; // selection changed
void on_set_hover_id() override{ m_rotate_gizmo.set_hover_id(m_hover_id); } void on_set_hover_id() override{ m_rotate_gizmo.set_hover_id(m_hover_id); }