Keep the texture displacement gizmo out of the assemble view

This commit is contained in:
SoftFever
2026-10-09 22:26:19 +08:00
parent 10787dd59d
commit 7d141bd691
2 changed files with 8 additions and 0 deletions
@@ -503,6 +503,11 @@ std::string GLGizmoTextureDisplacement::on_get_name() const
return _u8L("Texture displacement");
}
bool GLGizmoTextureDisplacement::on_is_activable() const
{
return m_parent.get_canvas_type() != GLCanvas3D::CanvasAssembleView && GLGizmoPainterBase::on_is_activable();
}
void GLGizmoTextureDisplacement::on_shutdown()
{
m_parent.toggle_model_objects_visibility(true);
@@ -208,6 +208,9 @@ public:
protected:
void on_render_input_window(float x, float y, float bottom_limit) override;
std::string on_get_name() const override;
// Never in the assemble view: its toolbar does not offer this gizmo, and every preview here is drawn
// with the main canvas's instance transform. The base alone would let the keyboard shortcut open it there.
bool on_is_activable() const override;
wxString handle_snapshot_action_name(bool shift_down, Button button_down) const override;