UI: Fix source toolbar color selection on color source
When selecting a color on the color source, if you pressed cancel, it would cause it to set the color to black. Instead, make sure to check isValid() on the returned color value to see if the user pressed cancel when selecting a color.
This commit is contained in:
parent
c13357ff91
commit
55c21319e0
@ -455,7 +455,12 @@ void ColorSourceToolbar::on_choose_clicked()
|
||||
options |= QColorDialog::DontUseNativeDialog;
|
||||
#endif
|
||||
|
||||
color = QColorDialog::getColor(color, this, desc, options);
|
||||
QColor newColor = QColorDialog::getColor(color, this, desc, options);
|
||||
if (!newColor.isValid()) {
|
||||
return;
|
||||
}
|
||||
|
||||
color = newColor;
|
||||
UpdateColor();
|
||||
|
||||
obs_data_t *settings = obs_data_create();
|
||||
|
Loading…
x
Reference in New Issue
Block a user