From 8b2ec79e72c3c62070d6a775dc10fc9f483f6876 Mon Sep 17 00:00:00 2001 From: Liza Carvelli Date: Mon, 18 Aug 2025 13:56:45 +0200 Subject: [PATCH] Fix clipboard issues --- Questionable/Windows/ConfigComponents/DutyConfigComponent.cs | 2 +- Questionable/Windows/PriorityWindow.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Questionable/Windows/ConfigComponents/DutyConfigComponent.cs b/Questionable/Windows/ConfigComponents/DutyConfigComponent.cs index 50fd326a..938d0641 100644 --- a/Questionable/Windows/ConfigComponents/DutyConfigComponent.cs +++ b/Questionable/Windows/ConfigComponents/DutyConfigComponent.cs @@ -206,7 +206,7 @@ internal sealed class DutyConfigComponent : ConfigComponent ImGui.SameLine(); - string clipboardText = ImGui.GetClipboardText(); + string clipboardText = ImGui.GetClipboardText().Trim(); using (ImRaii.Disabled(string.IsNullOrEmpty(clipboardText) || !clipboardText.StartsWith(DutyClipboardPrefix, StringComparison.InvariantCulture))) { diff --git a/Questionable/Windows/PriorityWindow.cs b/Questionable/Windows/PriorityWindow.cs index 6b14a677..4fcb92e0 100644 --- a/Questionable/Windows/PriorityWindow.cs +++ b/Questionable/Windows/PriorityWindow.cs @@ -212,7 +212,7 @@ internal sealed class PriorityWindow : LWindow private static List ParseClipboardItems() { - string clipboardText = ImGui.GetClipboardText(); + string clipboardText = ImGui.GetClipboardText().Trim(); return DecodeQuestPriority(clipboardText); } @@ -221,7 +221,7 @@ internal sealed class PriorityWindow : LWindow List clipboardItems = new List(); try { - if (string.IsNullOrEmpty(clipboardText) && clipboardText.StartsWith(ClipboardPrefix, StringComparison.InvariantCulture)) + if (!string.IsNullOrEmpty(clipboardText) && clipboardText.StartsWith(ClipboardPrefix, StringComparison.InvariantCulture)) { clipboardText = clipboardText.Substring(ClipboardPrefix.Length); string text = Encoding.UTF8.GetString(Convert.FromBase64String(clipboardText)); -- 2.20.1