Skip to content

Commit

Permalink
Merge 688a7b1 into 324d77d
Browse files Browse the repository at this point in the history
  • Loading branch information
agarny committed Dec 17, 2019
2 parents 324d77d + 688a7b1 commit c3a2ffb
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 16 deletions.
1 change: 1 addition & 0 deletions doc/downloads/index.js
Expand Up @@ -37,6 +37,7 @@ var jsonData = { "versions": [
}
],
"changes": [
{ "change": "<strong>Simulation Experiment view:</strong> can now reopen a remote <a href=\"https://cellml.org/\">CellML</a> file from a <a href=\"https://sed-ml.github.io/\">SED-ML</a> file (see issue <a href=\"https://github.com/opencor/opencor/issues/2191\">#2191</a>)." },
{ "change": "<strong>Third-party libraries:</strong> upgraded <a href=\"https://github.com/qtwebkit/qtwebkit/wiki\">QtWebKit</a> to v5.212.0-alpha3 (see issue <a href=\"https://github.com/opencor/opencor/issues/2252\">#2252</a>)." }
]
},
Expand Down
8 changes: 4 additions & 4 deletions doc/downloads/previousSnapshots.js
Expand Up @@ -23,7 +23,7 @@ var jsonData = { "versions": [
{ "change": "<strong>CellML support:</strong> fixed an issue with the CellML API wrongly allowing code generation for non-runnable models (see issue <a href=\"https://github.com/opencor/opencor/issues/2240\">#2240</a>)." },
{ "change": "<strong>SED-ML support:</strong> added support left and right triangle symbols (see issue <a href=\"https://github.com/opencor/opencor/issues/2173\">#2173</a>)." },
{ "change": "<strong>Simulation support:</strong> don't require all our solvers to be installed anymore (see issue <a href=\"https://github.com/opencor/opencor/issues/2234\">#2234</a>)." },
{ "change": "<strong>Simulation Experiment view:</strong> properly handle the Graph Panel properties (see issue <a href=\"https://github.com/opencor/opencor/issues/2171\">#2171</a>). Make sure that curves are plotted with all of their original settings when reloading a SED-ML file (see issue <a href=\"https://github.com/opencor/opencor/issues/2176\">#2176</a>). Make sure that all of a solver's properties get saved to a SED-ML file (see issue <a href=\"https://github.com/opencor/opencor/issues/2185\">#2185</a>). Don't access our central widget directly anymore (see issue <a href=\"https://github.com/opencor/opencor/issues/2218\">#2218</a>)." },
{ "change": "<strong>Simulation Experiment view:</strong> properly handle the Graph Panel properties (see issue <a href=\"https://github.com/opencor/opencor/issues/2171\">#2171</a>). Make sure that curves are plotted with all of their original settings when reloading a <a href=\"https://sed-ml.github.io/\">SED-ML</a> file (see issue <a href=\"https://github.com/opencor/opencor/issues/2176\">#2176</a>). Make sure that all of a solver's properties get saved to a <a href=\"https://sed-ml.github.io/\">SED-ML</a> file (see issue <a href=\"https://github.com/opencor/opencor/issues/2185\">#2185</a>). Don't access our central widget directly anymore (see issue <a href=\"https://github.com/opencor/opencor/issues/2218\">#2218</a>)." },
{ "change": "<strong>Third-party libraries:</strong> upgraded the <a href=\"https://openssl.org/\">OpenSSL</a> library to version 1.1.1d (see issue <a href=\"https://github.com/opencor/opencor/issues/2157\">#2157</a>). Upgraded <a href=\"https://llvm.org/\">LLVM</a>+<a href=\"https://clang.llvm.org/\">Clang</a> to version 9.0.0 (see issue <a href=\"https://github.com/opencor/opencor/issues/2161\">#2161</a>). Upgraded the <a href=\"https://computation.llnl.gov/projects/sundials\">SUNDIALS</a> library to version 5.0.0 (see issue <a href=\"https://github.com/opencor/opencor/issues/2198\">#2198</a>). Upgraded <a href=\"https://riverbankcomputing.com/software/qscintilla/intro\">QScintilla</a> to version 2.11.3 (see issue <a href=\"https://github.com/opencor/opencor/issues/2208\">#2208</a>). Upgraded <a href=\"https://mesa3d.org/\">Mesa</a> to version 19.2.6 (see issue <a href=\"https://github.com/opencor/opencor/issues/2230\">#2230</a>)." }
]
},
Expand Down Expand Up @@ -94,7 +94,7 @@ var jsonData = { "versions": [
],
"changes": [
{ "change": "<strong>General:</strong> prebuilt third-party libraries are now installed under <a href=\"https://github.com/opencor/opencor/tree/master/ext\"><code>[OpenCOR]/ext</code></a> (see issue <a href=\"https://github.com/opencor/opencor/issues/2126\">#2126</a>)." },
{ "change": "<strong>CellML Text view:</strong> can once again read a CellML file that has no XML processing instruction (see issue <a href=\"https://github.com/opencor/opencor/issues/2125\">#2125</a>)." },
{ "change": "<strong>CellML Text view:</strong> can once again read a <a href=\"https://cellml.org/\">CellML</a> file that has no XML processing instruction (see issue <a href=\"https://github.com/opencor/opencor/issues/2125\">#2125</a>)." },
{ "change": "<strong>Simulation Experiment view:</strong> properly disable the `Reset All Model Parameters` button (see issue <a href=\"https://github.com/opencor/opencor/issues/2116\">#2116</a>). Fixed an issue with the plotting of simulation data being potentially (very) choppy (see issue <a href=\"https://github.com/opencor/opencor/issues/2118\">#2118</a>)." },
{ "change": "<strong>Third-party libraries:</strong> upgraded <a href=\"https://jquery.com/\">jQuery</a> to version 3.4.1 (see issue <a href=\"https://github.com/opencor/opencor/issues/2122\">#2122</a>). Upgraded <a href=\"https://libgit2.github.com/\">libgit2</a> to version 0.28.2 (see issue <a href=\"https://github.com/opencor/opencor/issues/2123\">#2123</a>). Upgraded <a href=\"https://mesa3d.org/\">Mesa</a> to version 19.1.1 (see issue <a href=\"https://github.com/opencor/opencor/issues/2124\">#2124</a>). Upgraded <a href=\"https://riverbankcomputing.com/software/qscintilla/intro\">QScintilla</a> to version 2.11.2 (see issue <a href=\"https://github.com/opencor/opencor/issues/2131\">#2131</a>)." }
]
Expand Down Expand Up @@ -167,7 +167,7 @@ var jsonData = { "versions": [
}
],
"changes": [
{ "change": "<strong>SED-ML support:</strong> fixed our detection of SED-ML file (see issue <a href=\"https://github.com/opencor/opencor/issues/2082\">#2082</a>)." },
{ "change": "<strong>SED-ML support:</strong> fixed our detection of <a href=\"https://sed-ml.github.io/\">SED-ML</a> file (see issue <a href=\"https://github.com/opencor/opencor/issues/2082\">#2082</a>)." },
{ "change": "<strong>Simulation support:</strong> generalised the reporting of a simulation's issues (see issue <a href=\"https://github.com/opencor/opencor/issues/2080\">#2080</a>)." }
]
},
Expand Down Expand Up @@ -243,7 +243,7 @@ var jsonData = { "versions": [
{ "change": "<strong>General:</strong> upgraded to Qt 5.12.0 LTS (see issue <a href=\"https://github.com/opencor/opencor/issues/1910\">#1910</a>)." },
{ "change": "<strong>COMBINE support:</strong> now recognise files that have a master attribute of \"1\" rather than \"true\" (see issue <a href=\"https://github.com/opencor/opencor/issues/1912\">#1912</a>)." },
{ "change": "<strong>Graph Panel widget:</strong> fixed a small problem with the scale range of an axis in some cases (see issue <a href=\"https://github.com/opencor/opencor/issues/1941\">#1941</a>)." },
{ "change": "<strong>CellML Annotation view:</strong> prevent OpenCOR from crashing after a CellML file has been rendered invalid (see issue <a href=\"https://github.com/opencor/opencor/issues/1958\">#1958</a>)." },
{ "change": "<strong>CellML Annotation view:</strong> prevent OpenCOR from crashing after a <a href=\"https://cellml.org/\">CellML</a> file has been rendered invalid (see issue <a href=\"https://github.com/opencor/opencor/issues/1958\">#1958</a>)." },
{ "change": "<strong>CellML Text view:</strong> improved Unicode support (see issue <a href=\"https://github.com/opencor/opencor/issues/1926\">#1926</a>)." },
{ "change": "<strong>CellML tools:</strong> can now validate a <a href=\"https://cellml.org/\">CellML</a> file from the <a href=\"https://en.wikipedia.org/wiki/Command-line_interface\">CLI</a> (see issue <a href=\"https://github.com/opencor/opencor/issues/1964\">#1964</a>)." },
{ "change": "<strong>Simulation Experiment view:</strong> added basic support for the import of external data (see issue <a href=\"https://github.com/opencor/opencor/issues/1845\">#1845</a>). Ensure that graph panels are always properly aligned (see issue <a href=\"https://github.com/opencor/opencor/issues/1956\">#1956</a>). Fixed various issues with saving a file under a new name (see issue <a href=\"https://github.com/opencor/opencor/issues/1967\">#1967</a>)." },
Expand Down
1 change: 1 addition & 0 deletions doc/whatIsNew.js
Expand Up @@ -49,6 +49,7 @@ var jsonData = { "versions": [
{ "type": "improved", "description": "Plotting of simulations." },
{ "type": "fixed", "description": "Issue with handling the Graph Panel properties." },
{ "type": "fixed", "description": "Various issues with saving a file under a new name." },
{ "type": "fixed", "description": "Issue with reopening a remote <a href=\"https://cellml.org/\">CellML</a> file from a <a href=\"https://sed-ml.github.io/\">SED-ML</a> file." },
{ "type": "fixed", "description": "Issue with a <a href=\"https://sed-ml.github.io/\">SED-ML</a> file / <a href=\"https://co.mbine.org/documents/archive\">COMBINE archive</a> not necessarily saving all of a solver's properties." },
{ "type": "fixed", "description": "Issue with a <a href=\"https://sed-ml.github.io/\">SED-ML</a> file / <a href=\"https://co.mbine.org/documents/archive\">COMBINE archive</a> being considered modified after changing languages." }
]
Expand Down
14 changes: 11 additions & 3 deletions src/plugins/miscellaneous/Core/src/centralwidget.cpp
Expand Up @@ -1222,9 +1222,17 @@ bool CentralWidget::closeFile(int pIndex, bool pForceClosing)
qobject_cast<FileHandlingInterface *>(plugin->instance())->fileClosed(fileName);
}

// Unregister the file from our file manager
// Unregister the file from our file manager, but not if it is a remote
// file that is a dependency of another (e.g. a remote CellML file that
// is a dependency of a local/remote SED-ML file) since otherwise we
// will lose track of it (see issue #2191)

FileManager::instance()->unmanage(fileName);
FileManager *fileManagerInstance = FileManager::instance();

if ( !fileManagerInstance->isRemote(fileName)
|| !fileManagerInstance->isDependency(fileName)) {
fileManagerInstance->unmanage(fileName);
}

// Update our modified settings

Expand Down Expand Up @@ -1859,7 +1867,7 @@ void CentralWidget::updateNoViewMsg()
Plugin *fileViewPlugin = viewPlugin(fileTabIndex);

if (fileViewPlugin != nullptr) {
if (Core::FileManager::instance()->isNew(mFileNames[fileTabIndex])) {
if (FileManager::instance()->isNew(mFileNames[fileTabIndex])) {
mNoViewMsg->setMessage(tr("The <strong>%1</strong> view does not support new files...").arg(qobject_cast<ViewInterface *>(fileViewPlugin->instance())->viewName()));
} else {
mNoViewMsg->setMessage(tr("The <strong>%1</strong> view does not support this type of file...").arg(qobject_cast<ViewInterface *>(fileViewPlugin->instance())->viewName()));
Expand Down
16 changes: 16 additions & 0 deletions src/plugins/miscellaneous/Core/src/filemanager.cpp
Expand Up @@ -520,6 +520,22 @@ void FileManager::setDependencies(const QString &pFileName,

//==============================================================================

bool FileManager::isDependency(const QString &pFileName) const
{
// Return whether the given file is a dependency of one of the files we are
// managing

for (auto file : mFiles) {
if (file->dependencies().contains(pFileName)) {
return true;
}
}

return false;
}

//==============================================================================

void FileManager::reload(const QString &pFileName)
{
// Make sure that the given file is managed
Expand Down
2 changes: 2 additions & 0 deletions src/plugins/miscellaneous/Core/src/filemanager.h
Expand Up @@ -132,6 +132,8 @@ class CORE_EXPORT FileManager : public QObject
QStringList dependencies(const QString &pFileName) const;
void setDependencies(const QString &pFileName, const QStringList &pDependencies);

bool isDependency(const QString &pFileName) const;

void reload(const QString &pFileName);

Status create(const QString &pUrl = QString(),
Expand Down
18 changes: 9 additions & 9 deletions src/plugins/support/SEDMLSupport/src/sedmlfile.cpp
Expand Up @@ -1346,15 +1346,6 @@ CellMLSupport::CellmlFile * SedmlFile::cellmlFile()

if (QFile::exists(cellmlFileName)) {
mCellmlFile = new CellMLSupport::CellmlFile(cellmlFileName);

// Set our CellML file and its dependencies, if any, as
// dependencies for ourselves, if we don't have an owner

if (!hasOwner) {
fileManagerInstance->setDependencies(realFileName,
QStringList() << mCellmlFile->fileName()
<< mCellmlFile->dependencies());
}
} else {
mIssues << SedmlFileIssue(SedmlFileIssue::Type::Error,
tr("%1 could not be found").arg(modelSource));
Expand Down Expand Up @@ -1399,6 +1390,15 @@ CellMLSupport::CellmlFile * SedmlFile::cellmlFile()

Core::hideCentralBusyWidget();
}

// Set our CellML file and its dependencies, if any, as dependencies for
// ourselves, if we don't have an owner

if (!hasOwner && (mCellmlFile != nullptr)) {
fileManagerInstance->setDependencies(realFileName,
QStringList() << mCellmlFile->fileName()
<< mCellmlFile->dependencies());
}
}

return mCellmlFile;
Expand Down

0 comments on commit c3a2ffb

Please sign in to comment.