From 7e2a51b65f744c462f321e853eaea74df6808240 Mon Sep 17 00:00:00 2001 From: Roy Qu Date: Thu, 3 Feb 2022 21:46:53 +0800 Subject: [PATCH] fix: CustomDisabledIconEngine's clone() not correct --- RedPandaIDE/widgets/customdisablediconengine.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/RedPandaIDE/widgets/customdisablediconengine.cpp b/RedPandaIDE/widgets/customdisablediconengine.cpp index c1176a67..bae2b850 100644 --- a/RedPandaIDE/widgets/customdisablediconengine.cpp +++ b/RedPandaIDE/widgets/customdisablediconengine.cpp @@ -20,7 +20,10 @@ void CustomDisabledIconEngine::paint(QPainter *painter, const QRect &rect, QIcon QIconEngine *CustomDisabledIconEngine::clone() const { - return new CustomDisabledIconEngine(); + CustomDisabledIconEngine* eng = new CustomDisabledIconEngine(); + eng->mPixmap = mPixmap; + eng->mDisabledPixmap = mDisabledPixmap; + return eng; } QPixmap CustomDisabledIconEngine::pixmap(const QSize &size, QIcon::Mode mode, QIcon::State state)