Skip to content

Commit 6190428

Browse files
committed
add full path of the bob fileas a tab name, if no name are indicated in the properties of the bob file
1 parent 3ba99e5 commit 6190428

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

app/display/editor/src/main/java/org/csstudio/display/builder/editor/app/DisplayEditorInstance.java

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,15 @@ public class DisplayEditorInstance implements AppInstance
8080

8181
private final WidgetPropertyListener<String> model_name_listener = (property, old_value, new_value) ->
8282
{
83-
final String label = EditorUtil.isDisplayReadOnly(property.getWidget().checkDisplayModel())
84-
? "[R/O] " + property.getValue()
85-
: "[Edit] " + property.getValue();
83+
String userDataInputFile = property.getWidget().getUserData(DisplayModel.USER_DATA_INPUT_FILE);
84+
85+
String value = (property.getValue() == null || property.getValue().isEmpty())
86+
? userDataInputFile
87+
: property.getValue();
88+
89+
final String label = EditorUtil.isDisplayReadOnly(property.getWidget().checkDisplayModel())
90+
? "[R/O] " + value
91+
: "[Edit] " + value;
8692
Platform.runLater(() -> dock_item.setLabel(label));
8793
};
8894

0 commit comments

Comments
 (0)