Show 'read only' in title of window if a pattern file in read only state.

--HG--
branch : feature
This commit is contained in:
Roman Telezhynskyi 2016-01-25 11:13:41 +02:00
parent 1f624ec69b
commit 11aae952cb

View File

@ -4164,7 +4164,7 @@ QString MainWindow::GetPatternFileName()
{
shownName = StrippedName(curFile);
}
shownName += "[*]";
shownName += QLatin1Literal("[*]");
return shownName;
}
@ -4177,23 +4177,30 @@ QString MainWindow::GetMeasurementFileName()
}
else
{
QString shownName = " [";
QString shownName(" [");
shownName += StrippedName(AbsoluteMPath(curFile, doc->MPath()));
if(mChanges)
{
shownName += "*";
shownName += QLatin1Literal("*");
}
shownName += "]";
shownName += QLatin1Literal("]");
return shownName;
}
}
//---------------------------------------------------------------------------------------------------------------------
void MainWindow::UpdateWindowTitle()
{
if (not patternReadOnly)
{
setWindowTitle(GetPatternFileName()+GetMeasurementFileName());
}
else
{
setWindowTitle(GetPatternFileName()+GetMeasurementFileName() + " " + tr("(read only)"));
}
setWindowFilePath(curFile);
#if defined(Q_OS_MAC)