From be609ded5d45762660075da16eb111154b53fd6f Mon Sep 17 00:00:00 2001 From: Gennady Pospelov <g.pospelov@fz-juelich.de> Date: Wed, 20 Aug 2014 17:00:49 +0200 Subject: [PATCH] Correct title in OutputDataItem. --- GUI/coregui/Models/OutputDataItem.cpp | 2 ++ GUI/coregui/Views/InstrumentView.cpp | 7 ++----- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/GUI/coregui/Models/OutputDataItem.cpp b/GUI/coregui/Models/OutputDataItem.cpp index 53d3d21e416..4a49f3ff00c 100644 --- a/GUI/coregui/Models/OutputDataItem.cpp +++ b/GUI/coregui/Models/OutputDataItem.cpp @@ -34,6 +34,8 @@ void OutputDataItem::setOutputData(OutputData<double> *data) qDebug() << "OutputDataItem::setOutputData(OutputData<double> *data)"; delete m_data; m_data = data; + m_xaxis_title = QString(data->getAxis(0)->getName().c_str()); + m_yaxis_title = QString(data->getAxis(1)->getName().c_str()); emit modified(); } } diff --git a/GUI/coregui/Views/InstrumentView.cpp b/GUI/coregui/Views/InstrumentView.cpp index 8c92ed47c6b..a5cad132647 100644 --- a/GUI/coregui/Views/InstrumentView.cpp +++ b/GUI/coregui/Views/InstrumentView.cpp @@ -49,11 +49,9 @@ InstrumentView::InstrumentView(InstrumentModel *model, QWidget *parent) createActions(); - if(m_instrumentModel->rowCount(QModelIndex()) == 0) { + if(m_instrumentModel->rowCount(QModelIndex()) == 0) onAddInstrument(); - onAddInstrument(); - onAddInstrument(); - } + updateView(); } @@ -62,7 +60,6 @@ void InstrumentView::updateView() { qDebug() << "InstrumentView::updateView()"; m_instrumentSelector->updateSelection(); -// updateMapOfNames(); } -- GitLab