make sure that the color picker dialogs have the right parent

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8918 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jean-Marc Lasgouttes 2004-08-13 23:29:02 +00:00
parent 7914e9c401
commit 3f9e3449d5
3 changed files with 8 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2004-08-14 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
* QPrefsDialog.C (change_color):
* QDocumentDialog.C (toggleBranchColor): set the parent of the
color picker correctly.
2004-08-13 Jean-Marc Lasgouttes <lasgouttes@lyx.org> 2004-08-13 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
* QLPopupMenu.C (fire): make Qt process events before we * QLPopupMenu.C (fire): make Qt process events before we

View File

@ -533,7 +533,7 @@ void QDocumentDialog::toggleBranchColor()
string x11hexname = branch->getColor(); string x11hexname = branch->getColor();
if (x11hexname[0] == '#') if (x11hexname[0] == '#')
initial.setNamedColor(toqstr(x11hexname)); initial.setNamedColor(toqstr(x11hexname));
QColor ncol(QColorDialog::getColor(initial)); QColor ncol(QColorDialog::getColor(initial, qApp->focusWidget() ? qApp->focusWidget() : qApp->mainWidget()));
if (ncol.isValid()){ if (ncol.isValid()){
// add the color to the branchlist // add the color to the branchlist
branch->setColor(fromqstr(ncol.name())); branch->setColor(fromqstr(ncol.name()));

View File

@ -442,7 +442,7 @@ void QPrefsDialog::change_color()
return; return;
QListBoxItem * ib(lb->item(lb->currentItem())); QListBoxItem * ib(lb->item(lb->currentItem()));
QColorItem * ci(static_cast<QColorItem*>(ib)); QColorItem * ci(static_cast<QColorItem*>(ib));
QColor c(QColorDialog::getColor(ci->color())); QColor c(QColorDialog::getColor(ci->color(), qApp->focusWidget() ? qApp->focusWidget() : qApp->mainWidget()));
if (c.isValid()) { if (c.isValid()) {
ci->color(c); ci->color(c);
lb->update(); lb->update();