(#411) Setting well log plot title in the viewer's window title bar

This commit is contained in:
Pål Hagen
2015-09-04 17:01:33 +02:00
parent 15d34498e3
commit 469bcb63d9
2 changed files with 17 additions and 0 deletions

View File

@@ -89,6 +89,7 @@ void RimWellLogPlot::updateViewerWidget()
RiuMainWindow::instance()->addViewer(m_viewer, windowGeometry());
RiuMainWindow::instance()->setActiveViewer(m_viewer);
updateAxisRanges();
updateViewerWidgetWindowTitle();
}
else
{
@@ -118,6 +119,10 @@ void RimWellLogPlot::fieldChangedByUi(const caf::PdmFieldHandle* changedField, c
{
updateAxisRanges();
}
else if (changedField == &m_userName)
{
updateViewerWidgetWindowTitle();
}
}
//--------------------------------------------------------------------------------------------------
@@ -339,3 +344,14 @@ void RimWellLogPlot::setDescription(const QString& description)
{
m_userName = description;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimWellLogPlot::updateViewerWidgetWindowTitle()
{
if (m_viewer)
{
m_viewer->setWindowTitle(QString("Well Log Plot - %1").arg(m_userName));
}
}

View File

@@ -41,6 +41,7 @@ public:
virtual ~RimWellLogPlot();
void setDescription(const QString& description);
void updateViewerWidgetWindowTitle();
void addTrace(RimWellLogPlotTrace* trace);
size_t traceCount() { return traces.size();}