From fbeb57baf665dabb6c0c4752af562a6c1ae94f9b Mon Sep 17 00:00:00 2001 From: baldurk Date: Wed, 19 Jul 2017 13:00:00 +0100 Subject: [PATCH] Don't change background colour if the QColorDialog was aborted --- qrenderdoc/Windows/TextureViewer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qrenderdoc/Windows/TextureViewer.cpp b/qrenderdoc/Windows/TextureViewer.cpp index 93da0601c..7defd7cc0 100644 --- a/qrenderdoc/Windows/TextureViewer.cpp +++ b/qrenderdoc/Windows/TextureViewer.cpp @@ -3104,7 +3104,7 @@ void TextureViewer::on_backcolorPick_clicked() QColor col = QColorDialog::getColor(Qt::black, this, tr("Choose background colour")); if(!col.isValid()) - col = QColor(0, 0, 0); + return; col = col.toRgb(); m_TexDisplay.darkBackgroundColor = m_TexDisplay.lightBackgroundColor =