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
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,15 @@ public class DisplayEditorInstance implements AppInstance

private final WidgetPropertyListener<String> model_name_listener = (property, old_value, new_value) ->
{
final String label = EditorUtil.isDisplayReadOnly(property.getWidget().checkDisplayModel())
? "[R/O] " + property.getValue()
: "[Edit] " + property.getValue();
String fileName = property.getWidget().checkDisplayModel().getDisplayName();

String value = (property.getValue() == null || property.getValue().isEmpty())
? fileName
: property.getValue();

final String label = EditorUtil.isDisplayReadOnly(property.getWidget().checkDisplayModel())
? "[R/O] " + value
: "[Edit] " + value;
Platform.runLater(() -> dock_item.setLabel(label));
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,8 @@ public String getDisplayName()
name = getUserData(USER_DATA_INPUT_FILE);
if (name == null)
name = "<No name>";
else
name= new java.io.File(name).getName();;
}
return name;
}
Expand Down
2 changes: 1 addition & 1 deletion app/display/model/src/main/resources/examples/initial.bob
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<display version="2.0.0">
<name>Display</name>
<name></name>
<widget type="label" version="2.0.0">
<name>Label</name>
<class>TITLE</class>
Expand Down