Skip to content

Commit

Permalink
Merge 9549fec into 282c554
Browse files Browse the repository at this point in the history
  • Loading branch information
agarny committed Jun 13, 2018
2 parents 282c554 + 9549fec commit 0b3bcee
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 17 deletions.
1 change: 1 addition & 0 deletions doc/downloads/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ var jsonData = { "versions": [
],
"changes": [
{ "change": "<strong>General:</strong> General: fixed a problem with not being able to start OpenCOR from the system PATH (see issue <a href=\"https://github.com/opencor/opencor/issues/1688\">#1688</a>)." },
{ "change": "<strong>Central widget:</strong> fixed an issue with the tab bar shifting when switching tabs <a href=\"https://github.com/opencor/opencor/issues/1691\">#1691</a>)." },
{ "change": "<strong>Text-based editors:</strong> prevent infinite \"Replace all\" actions (see issue <a href=\"https://github.com/opencor/opencor/issues/1677\">#1677</a>). Sped up our highlight/replace all method (see issue <a href=\"https://github.com/opencor/opencor/issues/1679\">#1679</a>). Now have word-wrap alignment <a href=\"https://github.com/opencor/opencor/issues/1680\">#1680</a>)." },
{ "change": "<strong>Third-party libraries:</strong> upgraded <a href=\"https://libgit2.github.com/\">libgit2</a> to version 0.27.1 (see issue <a href=\"https://github.com/opencor/opencor/issues/1672\">#1672</a>)." }
]
Expand Down
41 changes: 24 additions & 17 deletions src/plugins/miscellaneous/Core/src/centralwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -693,33 +693,40 @@ void CentralWidget::updateFileTab(int pIndex, bool pIconOnly)
QUrl(url).fileName():
QFileInfo(fileName).fileName();

mFileTabs->setTabText(pIndex, tabText+(fileManagerInstance->isNewOrModified(fileName)?
"*":
QString()));
mFileTabs->setTabToolTip(pIndex, fileIsNew?
tabText:
fileIsRemote?
url:
QDir::toNativeSeparators(fileName));
if (fileManagerInstance->isNewOrModified(fileName))
tabText += "*";

if (tabText.compare(mFileTabs->tabText(pIndex)))
mFileTabs->setTabText(pIndex, tabText);

QString tabToolTip = fileIsNew?
tabText:
fileIsRemote?
url:
QDir::toNativeSeparators(fileName);

if (tabToolTip.compare(mFileTabs->tabToolTip(pIndex)))
mFileTabs->setTabToolTip(pIndex, tabToolTip);

tabIcon = qobject_cast<ViewInterface *>(viewPlugin(pIndex)->instance())->fileTabIcon(mFileNames[pIndex]);
}

if (tabIcon.isNull()) {
mFileTabs->setTabIcon(pIndex, fileIsRemote?
InternetIcon:
QFile::exists(fileName)?
fileManagerInstance->isReadableAndWritable(fileName)?
NoIcon:
LockedIcon:
NoIcon);
tabIcon = fileIsRemote?
InternetIcon:
QFile::exists(fileName)?
fileManagerInstance->isReadableAndWritable(fileName)?
NoIcon:
LockedIcon:
NoIcon;
// Note: we really want to call isReadableAndWritable() rather than
// isLocked() since no icon should be shown only if the file can
// be both readable and writable (see
// CorePlugin::filePermissionsChanged())...
} else {
mFileTabs->setTabIcon(pIndex, tabIcon);
}

if (QVariant(tabIcon) != QVariant(mFileTabs->tabIcon(pIndex)))
mFileTabs->setTabIcon(pIndex, tabIcon);
}

//==============================================================================
Expand Down

0 comments on commit 0b3bcee

Please sign in to comment.