From 65d05ee1cd5abe81456537fa75b6b326c1de9370 Mon Sep 17 00:00:00 2001 From: Andrei Kortunov Date: Sat, 19 Aug 2017 14:30:04 +0400 Subject: [PATCH] Get only text from clipboard (bug #4025) --- apps/openmw/mwgui/windowmanagerimp.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/apps/openmw/mwgui/windowmanagerimp.cpp b/apps/openmw/mwgui/windowmanagerimp.cpp index 97aedab81..e4f6eafde 100644 --- a/apps/openmw/mwgui/windowmanagerimp.cpp +++ b/apps/openmw/mwgui/windowmanagerimp.cpp @@ -1983,12 +1983,8 @@ namespace MWGui char* text=0; text = SDL_GetClipboardText(); if (text) - { - // MyGUI's clipboard might still have color information, to retain that information, only set the new text - // if it actually changed (clipboard inserted by an external application) - if (MyGUI::TextIterator::getOnlyText(_data) != text) - _data = text; - } + _data = MyGUI::TextIterator::toTagsString(text); + SDL_free(text); }