mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Added updateViewerWidgetWindowTitle for summary plots
This commit is contained in:
parent
ea6d652a17
commit
ac5402ca5a
@ -1316,7 +1316,7 @@ void RiaApplication::createMainPlotWindow()
|
||||
|
||||
m_mainPlotWindow = new RiuMainPlotWindow;
|
||||
|
||||
m_mainPlotWindow->setWindowTitle("Summary Plots for ResInsight");
|
||||
m_mainPlotWindow->setWindowTitle("Plots - ResInsight");
|
||||
m_mainPlotWindow->setDefaultWindowSize();
|
||||
m_mainPlotWindow->loadWinGeoAndDockToolBarLayout();
|
||||
m_mainPlotWindow->showWindow();
|
||||
@ -1327,11 +1327,11 @@ void RiaApplication::createMainPlotWindow()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiaApplication::deleteMainPlotWindow()
|
||||
{
|
||||
m_mainPlotWindow->deleteLater();
|
||||
|
||||
processEvents();
|
||||
|
||||
m_mainPlotWindow = NULL;
|
||||
if (m_mainPlotWindow)
|
||||
{
|
||||
m_mainPlotWindow->deleteLater();
|
||||
m_mainPlotWindow = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -189,6 +189,10 @@ void RimSummaryPlot::fieldChangedByUi(const caf::PdmFieldHandle* changedField, c
|
||||
|
||||
uiCapability()->updateUiIconFromToggleField();
|
||||
}
|
||||
else if (changedField == &m_userName)
|
||||
{
|
||||
updateViewerWidgetWindowTitle();
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -202,7 +206,6 @@ void RimSummaryPlot::setupBeforeSave()
|
||||
{
|
||||
this->setMdiWindowGeometry(RiaApplication::instance()->mainPlotWindow()->windowGeometryForViewer(m_qwtPlot));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -223,7 +226,6 @@ QImage RimSummaryPlot::snapshotWindowContent()
|
||||
|
||||
QwtPlotRenderer plotRenderer;
|
||||
plotRenderer.render(m_qwtPlot, &painter, rect);
|
||||
|
||||
}
|
||||
|
||||
return image;
|
||||
@ -286,7 +288,7 @@ void RimSummaryPlot::updateViewerWidget()
|
||||
mainPlotWindow->setActiveViewer(m_qwtPlot);
|
||||
}
|
||||
|
||||
//updateViewerWidgetWindowTitle();
|
||||
updateViewerWidgetWindowTitle();
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -302,6 +304,17 @@ void RimSummaryPlot::updateViewerWidget()
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimSummaryPlot::updateViewerWidgetWindowTitle()
|
||||
{
|
||||
if (m_qwtPlot)
|
||||
{
|
||||
m_qwtPlot->setWindowTitle(m_userName);
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -68,6 +68,7 @@ protected:
|
||||
|
||||
private:
|
||||
void updateViewerWidget();
|
||||
void updateViewerWidgetWindowTitle();
|
||||
void detachAllCurves();
|
||||
void deletePlotWidget();
|
||||
|
||||
|
@ -168,8 +168,8 @@ void RiuMainPlotWindow::createToolBars()
|
||||
{
|
||||
// Snapshots
|
||||
QToolBar* toolbar = addToolBar(tr("View Snapshots"));
|
||||
/*
|
||||
toolbar->setObjectName(toolbar->windowTitle());
|
||||
/*
|
||||
toolbar->addAction(m_snapshotToClipboard);
|
||||
toolbar->addAction(m_snapshotToFile);
|
||||
toolbar->addAction(m_snapshotAllViewsToFile);
|
||||
|
Loading…
Reference in New Issue
Block a user