Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/nrniv/shapeplt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1218,7 +1218,8 @@ bool ShapePlot::has_iv_view() {
#endif // HAVE_IV

ShapePlotData::ShapePlotData(Symbol* sym, Object* sl) {
sym_ = sym;
// v unless given, as for a ShapePlot
sym_ = sym ? sym : hoc_table_lookup("v", hoc_built_in_symlist);
sl_ = sl;
if (sl_) {
++sl_->refcount;
Expand Down
4 changes: 2 additions & 2 deletions test/api/plotshape_interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ int main(void) {

ShapePlotInterface* of_list = nrn_get_plotshape_interface(object_named("ps_of_list"));
ok &= check(nrn_get_plotshape_section_list(of_list) == object_named("sl"), "section list");
// Both kinds start at -80 to 40. The variable name does not compare: a
// ShapePlot starts with v, a ShapePlotData with none until variable().
// Both kinds start with v, from -80 to 40.
ok &= check(strcmp(nrn_get_plotshape_varname(of_list), "v") == 0, "default varname");
ok &= check(nrn_get_plotshape_low(of_list) == -80.f, "default low");
ok &= check(nrn_get_plotshape_high(of_list) == 40.f, "default high");

Expand Down
Loading