From 280f29b1e52958d36d17fe2a8f2e4686e68a01a8 Mon Sep 17 00:00:00 2001 From: Philipp Spitzer Date: Wed, 28 Jul 2021 23:37:22 +0200 Subject: [PATCH] No lonely comma when city is missing. --- src/gui/conferenceeditor.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gui/conferenceeditor.cpp b/src/gui/conferenceeditor.cpp index bd682a5..a11eeae 100644 --- a/src/gui/conferenceeditor.cpp +++ b/src/gui/conferenceeditor.cpp @@ -89,7 +89,10 @@ void ConferenceEditor::itemSelected(const QModelIndex& current, const QModelInde conferenceTitle->setText(conf.title()); conferenceSubtitle->setText(conf.subtitle()); - conferenceWhere->setText(conf.city() + (!conf.venue().isEmpty() ? ", " + conf.venue() : "")); + QString where = conf.city(); + if (!conf.city().isEmpty() && !conf.venue().isEmpty()) where += ", "; + where += conf.venue(); + conferenceWhere->setText(where); conferenceWhen->setText( conf.start().toString("yyyy-MM-dd") + " - " + -- 2.39.5