diff --git a/src/frontends/qt2/ChangeLog b/src/frontends/qt2/ChangeLog index 8f373cedf1..ec8ba665a8 100644 --- a/src/frontends/qt2/ChangeLog +++ b/src/frontends/qt2/ChangeLog @@ -1,3 +1,9 @@ +2004-08-14 Jean-Marc Lasgouttes + + * QPrefsDialog.C (change_color): + * QDocumentDialog.C (toggleBranchColor): set the parent of the + color picker correctly. + 2004-08-13 Jean-Marc Lasgouttes * QLPopupMenu.C (fire): make Qt process events before we diff --git a/src/frontends/qt2/QDocumentDialog.C b/src/frontends/qt2/QDocumentDialog.C index 006d06b1a9..9d8cb50f6a 100644 --- a/src/frontends/qt2/QDocumentDialog.C +++ b/src/frontends/qt2/QDocumentDialog.C @@ -533,7 +533,7 @@ void QDocumentDialog::toggleBranchColor() string x11hexname = branch->getColor(); if (x11hexname[0] == '#') initial.setNamedColor(toqstr(x11hexname)); - QColor ncol(QColorDialog::getColor(initial)); + QColor ncol(QColorDialog::getColor(initial, qApp->focusWidget() ? qApp->focusWidget() : qApp->mainWidget())); if (ncol.isValid()){ // add the color to the branchlist branch->setColor(fromqstr(ncol.name())); diff --git a/src/frontends/qt2/QPrefsDialog.C b/src/frontends/qt2/QPrefsDialog.C index 50fae356d9..51a491ceb6 100644 --- a/src/frontends/qt2/QPrefsDialog.C +++ b/src/frontends/qt2/QPrefsDialog.C @@ -442,7 +442,7 @@ void QPrefsDialog::change_color() return; QListBoxItem * ib(lb->item(lb->currentItem())); QColorItem * ci(static_cast(ib)); - QColor c(QColorDialog::getColor(ci->color())); + QColor c(QColorDialog::getColor(ci->color(), qApp->focusWidget() ? qApp->focusWidget() : qApp->mainWidget())); if (c.isValid()) { ci->color(c); lb->update();