Skip to content

Commit fbf7fd6

Browse files
authored
Merge pull request #2128 from ControlSystemStudio/templ_inst_parent_display_2127
Template/instance widget: Pass display path info down to content ...
2 parents 1306ecf + 08e0b70 commit fbf7fd6

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

app/display/representation-javafx/src/main/java/org/csstudio/display/builder/representation/javafx/widgets/TemplateInstanceRepresentation.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2021 Oak Ridge National Laboratory.
2+
* Copyright (c) 2021-2022 Oak Ridge National Laboratory.
33
* All rights reserved. This program and the accompanying materials
44
* are made available under the terms of the Eclipse Public License v1.0
55
* which accompanies this distribution, and is available at
@@ -333,6 +333,11 @@ private void instantiateTemplateAndRepresent()
333333
// in timeouts of the editor awaiting complete representation
334334
new_model.setUserData(DisplayModel.USER_DATA_EMBEDDING_WIDGET, model_widget);
335335

336+
// Pass display file info down to embedded model for resource lookup
337+
final DisplayModel parent_model = model_widget.getDisplayModel();
338+
final String input_file = parent_model.getUserData(DisplayModel.USER_DATA_INPUT_FILE);
339+
new_model.setUserData(DisplayModel.USER_DATA_INPUT_FILE, input_file);
340+
336341
if (template.getChildren().size() > 0)
337342
{
338343
final int w = template.propWidth().getValue();

0 commit comments

Comments
 (0)