aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorConfuSomu2024-01-24 12:09:56 -0500
committerConfuSomu2024-01-24 12:09:56 -0500
commit803432b3907ac8934263b0317a756ffbe8549db1 (patch)
tree93747dc50f9ff382d1509859f01322065a3f2e81 /src
parent5aac009e969cc3bd15c484ba3437348cb7a4d186 (diff)
downloadActorViewer-803432b3907ac8934263b0317a756ffbe8549db1.tar
ActorViewer-803432b3907ac8934263b0317a756ffbe8549db1.tar.gz
ActorViewer-803432b3907ac8934263b0317a756ffbe8549db1.zip
Show error message in actor info tab when no actor
Diffstat (limited to 'src')
-rw-r--r--src/widgets/tab_actor_info.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/widgets/tab_actor_info.cpp b/src/widgets/tab_actor_info.cpp
index 79630df..341522d 100644
--- a/src/widgets/tab_actor_info.cpp
+++ b/src/widgets/tab_actor_info.cpp
@@ -32,7 +32,11 @@ TabActorInfo::~TabActorInfo() {
// TODO: do this in another thread, like for status_info
void TabActorInfo::update_ui() {
- if (not actor) return;
+ if (not actor) {
+ ui->displayNameText->setText(QString("<html><head/><body><p><span style=\"font-size:14pt; font-weight:600;\">%1</span></p></body></html>").arg(tr("Failed to display Actor")));
+ ui->avatarImage->setText("");
+ return;
+ }
ui->displayNameText->setText(ui->displayNameText->text().arg(actor->name).arg(actor->username));
ui->summaryText->setHtml(actor->summary);