Commit 4616af6b authored by Mathieu Tillet's avatar Mathieu Tillet
Browse files

Fix segfault when switching view

parent 103f7e2c
......@@ -44,7 +44,6 @@ class QDropEvent;
class QStackedLayout;
class QSettings;
class QVBoxLayout;
class QHBoxLayout;
namespace MantidQt {
namespace MantidWidgets {
......
......@@ -588,14 +588,14 @@ void InstrumentWidget::replaceWorkspace(
renameWorkspace(newWs);
m_instrumentActor.reset(new InstrumentActor(QString::fromStdString(newWs)));
// update the integration widget
updateIntegrationWidget();
// update the view and colormap
auto surface = getSurface();
surface->resetInstrumentActor(m_instrumentActor.get());
setupColorMap();
// update the integration widget
updateIntegrationWidget();
// reset the instrument position
m_renderTab->resetView();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment