mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-31 22:43:25 +00:00
Remove warning about a null pixmap.
Since I didn't add a pixmap to be the background of the new profile, yet, things got wrong on mac and crashed. This should fix it. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
470de7ee07
commit
e23841dd7f
1 changed files with 5 additions and 1 deletions
|
@ -360,7 +360,11 @@ void ProfileWidget2::resizeEvent(QResizeEvent* event)
|
|||
|
||||
void ProfileWidget2::fixBackgroundPos()
|
||||
{
|
||||
QPixmap p = QPixmap(":background").scaledToHeight(viewport()->height());
|
||||
QPixmap toBeScaled(":background");
|
||||
if (toBeScaled.isNull())
|
||||
return;
|
||||
QPixmap p = toBeScaled.scaledToHeight(viewport()->height());
|
||||
|
||||
int x = viewport()->width() / 2 - p.width() / 2;
|
||||
DivePixmapItem *bg = background;
|
||||
bg->setPixmap(p);
|
||||
|
|
Loading…
Add table
Reference in a new issue