diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/Port.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gui/Port.cpp b/src/gui/Port.cpp index f9a04016..9a20a8b8 100644 --- a/src/gui/Port.cpp +++ b/src/gui/Port.cpp @@ -383,11 +383,12 @@ GraphBox* Port::get_graph_box() const { SPtr<const GraphModel> graph = dynamic_ptr_cast<const GraphModel>(model()->parent()); - if (!graph) { + GraphBox* box = _app.window_factory()->graph_box(graph); + if (!box) { graph = dynamic_ptr_cast<const GraphModel>(model()->parent()->parent()); + box = _app.window_factory()->graph_box(graph); } - - return _app.window_factory()->graph_box(graph); + return box; } void |