Skip to content

Commit fccbef7

Browse files
author
Lucas Rebscher
authored
Merge pull request #367 from MetaCell/feature/357_stop_network_creation
Feature/357 stop network creation
2 parents 982d950 + cbd774d commit fccbef7

5 files changed

Lines changed: 28 additions & 6 deletions

File tree

netpyne_ui/netpyne_geppetto.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ def getPlot(self, plotName, LFPflavour, theme='gui'):
429429
# This arg brings dark theme. But some plots are broken by it
430430
args['theme'] = theme
431431

432-
if plotName in ("iplotConn", "iplot2Dnet") and sim.net.allCells:
432+
if plotName in ("iplotConn", "iplot2Dnet") and hasattr(sim, 'net') and sim.net.allCells:
433433
# To prevent unresponsive kernel, we don't show conns if they become too many
434434
num_conn = sum([len(cell.conns) for cell in sim.net.allCells if cell.conns])
435435
if num_conn > NUM_CONN_LIMIT:

package-lock.json

Lines changed: 21 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

webapp/components/instantiation/NetPyNEInstantiated.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ export default class NetPyNEInstantiated extends React.Component {
7272
};
7373

7474
updateInstances () {
75-
if (Instances.network) {
75+
if (window.Instances != null && window.Instances.network) {
7676
// update canvas only if there are instances to show
7777
this.canvasRef.current.engine.setLinesThreshold(25000);
7878
this.canvasRef.current.engine.updateSceneWithNewInstances(

webapp/components/topbar/menuConfiguration.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -279,14 +279,15 @@ export default {
279279
};
280280

281281
export const getViewMenu = (props) => {
282-
const instantiate = props.automaticInstantiation || props.modelState === MODEL_STATE.NOT_INSTANTIATED;
283282
const networkAction = () => {
284-
if (instantiate && props.automaticSimulation) {
283+
if (props.automaticInstantiation && props.automaticSimulation) {
285284
return createAndSimulateNetwork;
286285
}
287-
if (instantiate) {
286+
287+
if (props.automaticInstantiation) {
288288
return createNetwork;
289289
}
290+
290291
return showNetwork;
291292
};
292293

webapp/redux/reducers/general.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export const GENERAL_DEFAULT_STATE = {
1212
dialogTitle: '',
1313
dialogMessage: '',
1414
automaticSimulation: false,
15-
automaticInstantiation: true,
15+
automaticInstantiation: false,
1616
theme: 'gui',
1717
};
1818

0 commit comments

Comments
 (0)