From fb03014ce58f455a33ff5306136743c67c55009c Mon Sep 17 00:00:00 2001
From: Matthias Puchner <github@mpuchner.de>
Date: Wed, 10 Nov 2021 09:52:50 +0100
Subject: [PATCH] add btn to show a single particle layout in real space view

---
 GUI/View/SampleDesigner/ParticleLayoutForm.cpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/GUI/View/SampleDesigner/ParticleLayoutForm.cpp b/GUI/View/SampleDesigner/ParticleLayoutForm.cpp
index 8211e76fdef..ea221874c6c 100644
--- a/GUI/View/SampleDesigner/ParticleLayoutForm.cpp
+++ b/GUI/View/SampleDesigner/ParticleLayoutForm.cpp
@@ -48,7 +48,11 @@ ParticleLayoutForm::ParticleLayoutForm(LayerForm* parent, ParticleLayoutItem* la
     m_removeAction = ActionFactory::createRemoveAction(
         this, "particle layout", [=] { ec->removeLayout(parent, layoutItem); });
 
+    auto* showInRealSpaceAction = ActionFactory::createShowInRealSpaceAction(
+        this, "particle layout", [=] { ec->requestViewInRealSpace(layoutItem); });
+
     auto* collapser = GroupBoxCollapser::installIntoGroupBox(this);
+    collapser->addAction(showInRealSpaceAction);
     collapser->addAction(m_removeAction);
     m_layout = layouter.layout();
 }
-- 
GitLab