From 47dc50b2bb4d1db15a2fe569398214b7a9695337 Mon Sep 17 00:00:00 2001 From: Zlatin Balevsky Date: Thu, 5 Nov 2020 20:50:07 +0000 Subject: [PATCH] clear attachments table if there aren't any --- gui/griffon-app/views/com/muwire/gui/MainFrameView.groovy | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gui/griffon-app/views/com/muwire/gui/MainFrameView.groovy b/gui/griffon-app/views/com/muwire/gui/MainFrameView.groovy index 1041decd..b776bc33 100644 --- a/gui/griffon-app/views/com/muwire/gui/MainFrameView.groovy +++ b/gui/griffon-app/views/com/muwire/gui/MainFrameView.groovy @@ -1328,9 +1328,11 @@ class MainFrameView { model.messageButtonsEnabled = true model.messageRecipientList = String.join(",", selected.recipients.collect {it.getHumanReadableName()}) - if (selected.attachments.isEmpty() && selected.collections.isEmpty()) + if (selected.attachments.isEmpty() && selected.collections.isEmpty()) { messageSplitPane.setDividerLocation(1.0d) - else { + model.messageAttachments.clear() + messageAttachmentsTable.model.fireTableDataChanged() + } else { messageSplitPane.setDividerLocation(0.7d) model.messageAttachments.clear() model.messageAttachments.addAll(selected.attachments)