Mercurial > hg > svgui
comparison widgets/PropertyBox.cpp @ 361:67834ac56f2b
* better default name for new colour (hi Craig!)
author | Chris Cannam |
---|---|
date | Wed, 06 Feb 2008 14:25:46 +0000 |
parents | 2f83b6e3b8ca |
children | e1a9e478b7f2 |
comparison
equal
deleted
inserted
replaced
360:d58701996fae | 361:67834ac56f2b |
---|---|
640 { | 640 { |
641 QColor newColour = QColorDialog::getColor(); | 641 QColor newColour = QColorDialog::getColor(); |
642 if (!newColour.isValid()) return; | 642 if (!newColour.isValid()) return; |
643 | 643 |
644 ColourNameDialog dialog(tr("Name New Colour"), | 644 ColourNameDialog dialog(tr("Name New Colour"), |
645 tr("Enter name for the new colour:"), | 645 tr("Enter a name for the new colour:"), |
646 newColour, "", this); | 646 newColour, newColour.name(), this); |
647 dialog.showDarkBackgroundCheckbox(tr("Prefer black background for this colour")); | 647 dialog.showDarkBackgroundCheckbox(tr("Prefer black background for this colour")); |
648 if (dialog.exec() == QDialog::Accepted) { | 648 if (dialog.exec() == QDialog::Accepted) { |
649 //!!! command | 649 //!!! command |
650 ColourDatabase *db = ColourDatabase::getInstance(); | 650 ColourDatabase *db = ColourDatabase::getInstance(); |
651 int index = db->addColour(newColour, dialog.getColourName()); | 651 int index = db->addColour(newColour, dialog.getColourName()); |