mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-02-06 04:00:08 +00:00
Added handy new function parseXMLIfTagMatches(), and refactored a lot of old code that was parsing XML in a more clunky way
This commit is contained in:
parent
3b36c3e198
commit
0fb8c8e82a
20 changed files with 130 additions and 148 deletions
|
|
@ -302,10 +302,7 @@ void PaintRoutine::copySelectedToClipboard()
|
|||
|
||||
void PaintRoutine::paste()
|
||||
{
|
||||
XmlDocument clip (SystemClipboard::getTextFromClipboard());
|
||||
std::unique_ptr<XmlElement> doc (clip.getDocumentElement());
|
||||
|
||||
if (doc != nullptr && doc->hasTagName (clipboardXmlTag))
|
||||
if (auto doc = parseXMLIfTagMatches (SystemClipboard::getTextFromClipboard(), clipboardXmlTag))
|
||||
{
|
||||
selectedElements.deselectAll();
|
||||
selectedPoints.deselectAll();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue