Skip to content

Commit

Permalink
Update SBMLNetwork.
Browse files Browse the repository at this point in the history
Use new 'autorender' so we don't call autolayout twice.
  • Loading branch information
luciansmith committed Sep 1, 2024
1 parent 5ed2aac commit f8bfae0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ jobs:
libroadrunner_deps_owner: [ "sys-bio" ]
libroadrunner_deps_repo: [ "libroadrunner-deps" ]
libroadrunner_deps_name: [ "libroadrunner-deps" ]
libroadrunner_deps_release_version: [ "v2.2.3" ]
libroadrunner_deps_release_version: [ "v2.2.4" ]
python_version: [ "3.12" ]

runs-on: ${{ matrix.platform.os_name }}
Expand Down
1 change: 1 addition & 0 deletions src/layoutWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -694,6 +694,7 @@ bool LayoutWrapper::TransferLayoutInformationTo(SBMLDocument* sbml, const string
case lt_unknown:
break;
}
//assert(ret != -1);
}


Expand Down
13 changes: 6 additions & 7 deletions src/module-sbml.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2450,7 +2450,7 @@ void Module::CreateSBMLModel(bool comp)

// Layout/Render!
if (m_autolayout.use) {
LIBSBMLNETWORK_CPP_NAMESPACE::autolayout(&m_sbml, m_autolayout.maxNumConnectedEdges, m_autolayout.useNameAsTextLabel, true); // , m_autolayout.lockedNodeIds);
LIBSBMLNETWORK_CPP_NAMESPACE::autorender(&m_sbml);// , m_autolayout.maxNumConnectedEdges, m_autolayout.useNameAsTextLabel, true); // , m_autolayout.lockedNodeIds);
//For some reason, the following line is REQUIRED; otherwise I get linking errors(!) about how 'autolayout' is missing. WTF?? LS DEBUG
LIBSBMLNETWORK_CPP_NAMESPACE::getSBMLObject(&m_sbml, "S1");
if (m_layout.width != 0) {
Expand Down Expand Up @@ -2521,12 +2521,11 @@ void Module::CreateSBMLModel(bool comp)
m_autolayout.lockedNodeIds.insert(m_layout.align_circular.begin(), m_layout.align_circular.end());
//LIBSBMLNETWORK_CPP_NAMESPACE::autolayout(&m_sbml, m_autolayout.maxNumConnectedEdges, m_autolayout.useNameAsTextLabel, true, m_autolayout.lockedNodeIds);
}
if (m_autolayout.lockedNodeIds.size() > 0) {
double S1x = LIBSBMLNETWORK_CPP_NAMESPACE::getPositionX(&m_sbml, "S1");
LIBSBMLNETWORK_CPP_NAMESPACE::autolayout(&m_sbml, m_autolayout.maxNumConnectedEdges, m_autolayout.useNameAsTextLabel, true, m_autolayout.lockedNodeIds);
S1x = LIBSBMLNETWORK_CPP_NAMESPACE::getPositionX(&m_sbml, "S1");
S1x = S1x;
}
//double S1x = LIBSBMLNETWORK_CPP_NAMESPACE::getPositionX(&m_sbml, "S1");
LIBSBMLNETWORK_CPP_NAMESPACE::autolayout(&m_sbml, m_autolayout.maxNumConnectedEdges, m_autolayout.useNameAsTextLabel, true, m_autolayout.lockedNodeIds);
//S1x = LIBSBMLNETWORK_CPP_NAMESPACE::getPositionX(&m_sbml, "S1");
//S1x = S1x;

}
}

Expand Down

0 comments on commit f8bfae0

Please sign in to comment.