mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
Problem: When canceling the color selection dialog the color of the selected item is changed to black.
Solution: Add a test whether the color returned from the color dialog is valid. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18245 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
e5df7b6978
commit
43419ef0bd
@ -578,7 +578,7 @@ void PrefColors::change_color()
|
||||
QString color = newcolors_[row];
|
||||
QColor c(QColorDialog::getColor(QColor(color), qApp->focusWidget()));
|
||||
|
||||
if (c.name() != color) {
|
||||
if (c.isValid() && c.name() != color) {
|
||||
newcolors_[row] = c.name();
|
||||
QPixmap coloritem(32, 32);
|
||||
coloritem.fill(c);
|
||||
|
Loading…
Reference in New Issue
Block a user