mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-18 00:12:15 -07:00
Properly delete enlargedPixmapWidget.
Took 23 minutes Took 13 seconds Took 16 seconds
This commit is contained in:
parent
9ca5ee52e7
commit
578c650936
2 changed files with 4 additions and 4 deletions
|
|
@ -40,6 +40,8 @@ CardInfoPictureWidget::CardInfoPictureWidget(QWidget *parent, const bool _hoverT
|
||||||
|
|
||||||
enlargedPixmapWidget = new CardInfoPictureEnlargedWidget(this->window());
|
enlargedPixmapWidget = new CardInfoPictureEnlargedWidget(this->window());
|
||||||
enlargedPixmapWidget->hide();
|
enlargedPixmapWidget->hide();
|
||||||
|
connect(this, &CardInfoPictureWidget::deleteEnlargedPixmapWidget, enlargedPixmapWidget,
|
||||||
|
&CardInfoPictureEnlargedWidget::deleteLater);
|
||||||
|
|
||||||
hoverTimer = new QTimer(this);
|
hoverTimer = new QTimer(this);
|
||||||
hoverTimer->setSingleShot(true);
|
hoverTimer->setSingleShot(true);
|
||||||
|
|
@ -65,10 +67,7 @@ CardInfoPictureWidget::CardInfoPictureWidget(QWidget *parent, const bool _hoverT
|
||||||
|
|
||||||
CardInfoPictureWidget::~CardInfoPictureWidget()
|
CardInfoPictureWidget::~CardInfoPictureWidget()
|
||||||
{
|
{
|
||||||
if (enlargedPixmapWidget) {
|
emit deleteEnlargedPixmapWidget();
|
||||||
enlargedPixmapWidget->hide();
|
|
||||||
enlargedPixmapWidget->deleteLater();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,7 @@ signals:
|
||||||
void cardScaleFactorChanged(int _scale);
|
void cardScaleFactorChanged(int _scale);
|
||||||
void cardChanged(const ExactCard &card);
|
void cardChanged(const ExactCard &card);
|
||||||
void cardClicked();
|
void cardClicked();
|
||||||
|
void deleteEnlargedPixmapWidget();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void resizeEvent(QResizeEvent *event) override;
|
void resizeEvent(QResizeEvent *event) override;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue