Skip to content

Commit

Permalink
Template/instance widget: Pass display path info down to content ...
Browse files Browse the repository at this point in the history
.. to allow resolution of relative path names

Fixes #2127
  • Loading branch information
Kay committed Feb 8, 2022
1 parent b97729e commit 08e0b70
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2021 Oak Ridge National Laboratory.
* Copyright (c) 2021-2022 Oak Ridge National Laboratory.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
Expand Down Expand Up @@ -333,6 +333,11 @@ private void instantiateTemplateAndRepresent()
// in timeouts of the editor awaiting complete representation
new_model.setUserData(DisplayModel.USER_DATA_EMBEDDING_WIDGET, model_widget);

// Pass display file info down to embedded model for resource lookup
final DisplayModel parent_model = model_widget.getDisplayModel();
final String input_file = parent_model.getUserData(DisplayModel.USER_DATA_INPUT_FILE);
new_model.setUserData(DisplayModel.USER_DATA_INPUT_FILE, input_file);

if (template.getChildren().size() > 0)
{
final int w = template.propWidth().getValue();
Expand Down

0 comments on commit 08e0b70

Please sign in to comment.