Fixed stylize crash (i guess it would before xD)

This commit is contained in:
Rafael 2016-11-02 06:56:06 +01:00
parent aa75059f35
commit e46406207d
2 changed files with 8 additions and 2 deletions

View file

@ -64,6 +64,7 @@ PictureDialog::PictureDialog(ProfileDatabase *profileDB, CrewDatabase *crewDB, Q
plyrsList = QStringList(); plyrsList = QStringList();
fullscreenWidget = 0; fullscreenWidget = 0;
rqfullscreen = 0; rqfullscreen = 0;
navienabled = 0;
indexed = 0; indexed = 0;
picArea = ""; picArea = "";
picTitl = ""; picTitl = "";
@ -108,6 +109,7 @@ void PictureDialog::addPreviousNextButtons()
uiToolbar->addAction(QIcon(":/img/back.png"), "", this, SLOT(previousPictureRequestedSlot())); uiToolbar->addAction(QIcon(":/img/back.png"), "", this, SLOT(previousPictureRequestedSlot()));
uiToolbar->addAction(QIcon(":/img/next.png"), "", this, SLOT(nextPictureRequestedSlot())); uiToolbar->addAction(QIcon(":/img/next.png"), "", this, SLOT(nextPictureRequestedSlot()));
ui->jsonFrame->setStyleSheet(QString("QFrame { background: %1; }").arg(palette.window().color().name())); ui->jsonFrame->setStyleSheet(QString("QFrame { background: %1; }").arg(palette.window().color().name()));
navienabled = true;
#endif #endif
#endif #endif
} }
@ -133,9 +135,12 @@ bool PictureDialog::event(QEvent *event)
{ {
#ifdef GTA5SYNC_WIN #ifdef GTA5SYNC_WIN
#if QT_VERSION >= 0x050000 #if QT_VERSION >= 0x050000
if (event->type() == QWinEvent::CompositionChange || event->type() == QWinEvent::ColorizationChange) if (navienabled)
{ {
stylizeDialog(); if (event->type() == QWinEvent::CompositionChange || event->type() == QWinEvent::ColorizationChange)
{
stylizeDialog();
}
} }
#endif #endif
#endif #endif

View file

@ -98,6 +98,7 @@ private:
QString locY; QString locY;
QString locZ; QString locZ;
bool rqfullscreen; bool rqfullscreen;
bool navienabled;
bool indexed; bool indexed;
int index; int index;
QMenu *exportMenu; QMenu *exportMenu;