Browse Source

Projucer: Fixed a bug causing GUI editor code written with older Projucer versions to be overwritten

tags/2021-05-28
ed 4 years ago
parent
commit
67a9a76f24
2 changed files with 9 additions and 2 deletions
  1. +7
    -1
      extras/Projucer/Source/ComponentEditor/Components/jucer_ComponentTypeHandler.h
  2. +2
    -1
      extras/Projucer/Source/ComponentEditor/jucer_JucerDocument.cpp

+ 7
- 1
extras/Projucer/Source/ComponentEditor/Components/jucer_ComponentTypeHandler.h View File

@@ -52,7 +52,13 @@ public:
static ComponentTypeHandler* getHandlerFor (Component& component);
//==============================================================================
virtual String getXmlTagName() const noexcept { return className.toUpperCase(); }
virtual String getXmlTagName() const noexcept
{
if (className.startsWith ("juce::"))
return className.substring (6).toUpperCase();
return className.toUpperCase();
}
static ComponentTypeHandler* getHandlerForXmlTag (const String& tagName);


+ 2
- 1
extras/Projucer/Source/ComponentEditor/jucer_JucerDocument.cpp View File

@@ -311,7 +311,8 @@ void JucerDocument::setOptionalMethodEnabled (const String& methodSignature, con
bool JucerDocument::isOptionalMethodEnabled (const String& sig) const noexcept
{
return activeExtraMethods.contains (sig);
return activeExtraMethods.contains (sig)
|| activeExtraMethods.contains (sig.replace ("juce::", {}));
}
void JucerDocument::addExtraClassProperties (PropertyPanel&)


Loading…
Cancel
Save