mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Made rendering engine choice persist when ComponentPeers are re-created.
This commit is contained in:
parent
6269df4823
commit
3555b6e9d5
1 changed files with 6 additions and 0 deletions
|
|
@ -565,6 +565,7 @@ void Component::addToDesktop (int styleWanted, void* nativeWindowToAttachTo)
|
|||
bool wasMinimised = false;
|
||||
ComponentBoundsConstrainer* currentConstainer = nullptr;
|
||||
Rectangle<int> oldNonFullScreenBounds;
|
||||
int oldRenderingEngine = -1;
|
||||
|
||||
if (peer != nullptr)
|
||||
{
|
||||
|
|
@ -574,6 +575,7 @@ void Component::addToDesktop (int styleWanted, void* nativeWindowToAttachTo)
|
|||
wasMinimised = peer->isMinimised();
|
||||
currentConstainer = peer->getConstrainer();
|
||||
oldNonFullScreenBounds = peer->getNonFullScreenBounds();
|
||||
oldRenderingEngine = peer->getCurrentRenderingEngine();
|
||||
|
||||
flags.hasHeavyweightPeerFlag = false;
|
||||
Desktop::getInstance().removeDesktopComponent (this);
|
||||
|
|
@ -598,6 +600,10 @@ void Component::addToDesktop (int styleWanted, void* nativeWindowToAttachTo)
|
|||
|
||||
bounds.setPosition (topLeft);
|
||||
peer->setBounds (topLeft.x, topLeft.y, getWidth(), getHeight(), false);
|
||||
|
||||
if (oldRenderingEngine >= 0)
|
||||
peer->setCurrentRenderingEngine (oldRenderingEngine);
|
||||
|
||||
peer->setVisible (isVisible());
|
||||
|
||||
peer = ComponentPeer::getPeerFor (this);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue