diff --git a/modules/juce_gui_basics/drawables/juce_Drawable.cpp b/modules/juce_gui_basics/drawables/juce_Drawable.cpp index 61ed38f794..87b4f6a8f3 100644 --- a/modules/juce_gui_basics/drawables/juce_Drawable.cpp +++ b/modules/juce_gui_basics/drawables/juce_Drawable.cpp @@ -29,6 +29,12 @@ Drawable::Drawable() setPaintingIsUnclipped (true); } +Drawable::Drawable (const Drawable& other) +{ + setName (other.getName()); + setComponentID (other.getComponentID()); +} + Drawable::~Drawable() { } diff --git a/modules/juce_gui_basics/drawables/juce_Drawable.h b/modules/juce_gui_basics/drawables/juce_Drawable.h index 204ec4619d..3fbb73d7db 100644 --- a/modules/juce_gui_basics/drawables/juce_Drawable.h +++ b/modules/juce_gui_basics/drawables/juce_Drawable.h @@ -207,11 +207,11 @@ protected: friend class DrawableShape; /** @internal */ - void transformContextToCorrectOrigin (Graphics& g); + void transformContextToCorrectOrigin (Graphics&); /** @internal */ void parentHierarchyChanged(); /** @internal */ - void setBoundsToEnclose (const Rectangle& area); + void setBoundsToEnclose (const Rectangle&); Point originRelativeToComponent; @@ -243,12 +243,15 @@ protected: JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Positioner); }; + + Drawable (const Drawable&); #endif private: void nonConstDraw (Graphics& g, float opacity, const AffineTransform& transform); - JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Drawable); + Drawable& operator= (const Drawable&); + JUCE_LEAK_DETECTOR (Drawable); }; diff --git a/modules/juce_gui_basics/drawables/juce_DrawableComposite.cpp b/modules/juce_gui_basics/drawables/juce_DrawableComposite.cpp index a6de5eaa0e..0c307622d1 100644 --- a/modules/juce_gui_basics/drawables/juce_DrawableComposite.cpp +++ b/modules/juce_gui_basics/drawables/juce_DrawableComposite.cpp @@ -34,7 +34,8 @@ DrawableComposite::DrawableComposite() } DrawableComposite::DrawableComposite (const DrawableComposite& other) - : bounds (other.bounds), + : Drawable (other), + bounds (other.bounds), markersX (other.markersX), markersY (other.markersY), updateBoundsReentrant (false) diff --git a/modules/juce_gui_basics/drawables/juce_DrawableImage.cpp b/modules/juce_gui_basics/drawables/juce_DrawableImage.cpp index 1b1a345955..c0a18eb799 100644 --- a/modules/juce_gui_basics/drawables/juce_DrawableImage.cpp +++ b/modules/juce_gui_basics/drawables/juce_DrawableImage.cpp @@ -32,7 +32,8 @@ DrawableImage::DrawableImage() } DrawableImage::DrawableImage (const DrawableImage& other) - : image (other.image), + : Drawable (other), + image (other.image), opacity (other.opacity), overlayColour (other.overlayColour), bounds (other.bounds) diff --git a/modules/juce_gui_basics/drawables/juce_DrawableShape.cpp b/modules/juce_gui_basics/drawables/juce_DrawableShape.cpp index f57e21d181..0327247369 100644 --- a/modules/juce_gui_basics/drawables/juce_DrawableShape.cpp +++ b/modules/juce_gui_basics/drawables/juce_DrawableShape.cpp @@ -31,7 +31,8 @@ DrawableShape::DrawableShape() } DrawableShape::DrawableShape (const DrawableShape& other) - : strokeType (other.strokeType), + : Drawable (other), + strokeType (other.strokeType), mainFill (other.mainFill), strokeFill (other.strokeFill) { diff --git a/modules/juce_gui_basics/drawables/juce_DrawableText.cpp b/modules/juce_gui_basics/drawables/juce_DrawableText.cpp index 7a3819229e..e2b3ee173d 100644 --- a/modules/juce_gui_basics/drawables/juce_DrawableText.cpp +++ b/modules/juce_gui_basics/drawables/juce_DrawableText.cpp @@ -34,7 +34,8 @@ DrawableText::DrawableText() } DrawableText::DrawableText (const DrawableText& other) - : bounds (other.bounds), + : Drawable (other), + bounds (other.bounds), fontHeight (other.fontHeight), fontHScale (other.fontHScale), font (other.font),