mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Remove page number for Multi plots with only one page
This commit is contained in:
parent
93baf776a1
commit
377274cdec
@ -205,9 +205,18 @@ void RiuMultiPlotBook::setPlotTitle( const QString& plotTitle )
|
|||||||
{
|
{
|
||||||
m_plotTitle = plotTitle;
|
m_plotTitle = plotTitle;
|
||||||
for ( int i = 0; i < m_pages.size(); ++i )
|
for ( int i = 0; i < m_pages.size(); ++i )
|
||||||
|
{
|
||||||
|
int pageIndex = i + 1;
|
||||||
|
int pageCount = (int)m_pages.size();
|
||||||
|
if ( pageCount > pageIndex )
|
||||||
{
|
{
|
||||||
m_pages[i]->setPlotTitle( QString( "%1 %2/%3" ).arg( m_plotTitle ).arg( i + 1 ).arg( m_pages.size() ) );
|
m_pages[i]->setPlotTitle( QString( "%1 %2/%3" ).arg( m_plotTitle ).arg( i + 1 ).arg( m_pages.size() ) );
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_pages[i]->setPlotTitle( QString( "%1" ).arg( m_plotTitle ) );
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user