From 7a87e920f2d46d467aebfd58af93a585f514a76e Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Wed, 23 Jun 2021 09:20:23 +0200 Subject: [PATCH] HexEditor: Change name for unsaved files to 'Untitled' --- Userland/Applications/HexEditor/HexEditorWidget.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Userland/Applications/HexEditor/HexEditorWidget.cpp b/Userland/Applications/HexEditor/HexEditorWidget.cpp index 6cf46ec832..44805956c0 100644 --- a/Userland/Applications/HexEditor/HexEditorWidget.cpp +++ b/Userland/Applications/HexEditor/HexEditorWidget.cpp @@ -322,7 +322,10 @@ void HexEditorWidget::set_path(const LexicalPath& lexical_path) void HexEditorWidget::update_title() { StringBuilder builder; - builder.append(m_path); + if (m_path.is_empty()) + builder.append("Untitled"); + else + builder.append(m_path); if (m_document_dirty) builder.append(" (*)"); builder.append(" - Hex Editor");