Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 5914 → Rev 5915

/branches/Version13x/Scribus/scribus/cmykfw.cpp
21,10 → 21,11
#include "scribusdoc.h"
#include "util.h"
 
CMYKChoose::CMYKChoose( QWidget* parent, ScribusDoc* doc, ScColor orig, QString name, ColorList *Colors, QStringList Cust )
CMYKChoose::CMYKChoose( QWidget* parent, ScribusDoc* doc, ScColor orig, QString name, ColorList *Colors, QStringList Cust, bool newCol )
: QDialog( parent, "fw", true, 0 ), CurrSwatch(doc)
{
m_doc = doc;
isNew = newCol;
orig.setDocument(m_doc);
if (orig.getColorModel () == colorModelCMYK)
CMYKmode = true;
994,11 → 995,11
Farbname->selectAll();
return;
}
if (Fnam != Farbname->text())
if ((Fnam != Farbname->text()) || (isNew))
{
if (EColors->contains(Farbname->text()))
{
QMessageBox::information(this, CommonStrings::trWarning, tr("Name of the color is not unique"), CommonStrings::tr_OK, 0, 0, 0, QMessageBox::Ok);
QMessageBox::information(this, CommonStrings::trWarning, tr("The name of the color already exists,\nplease choose another one."), CommonStrings::tr_OK, 0, 0, 0, QMessageBox::Ok);
Farbname->selectAll();
Farbname->setFocus();
return;
/branches/Version13x/Scribus/scribus/colorm.cpp
723,7 → 723,7
void ColorManager::neueFarbe()
{
ScColor tmpFarbe = ScColor(0, 0, 0, 0);
CMYKChoose* dia = new CMYKChoose(this, m_Doc, tmpFarbe, tr("New Color"), &EditColors, customColSet);
CMYKChoose* dia = new CMYKChoose(this, m_Doc, tmpFarbe, tr("New Color"), &EditColors, customColSet, true);
int newItemIndex=0;
int colCount=0;
if (dia->exec())
754,7 → 754,7
int selectedIndex=colorListBox->currentItem();
int topIndex=colorListBox->topItem();
ScColor tmpFarbe = EditColors[sFarbe];
CMYKChoose* dia = new CMYKChoose(this, m_Doc, tmpFarbe, sFarbe, &EditColors, customColSet);
CMYKChoose* dia = new CMYKChoose(this, m_Doc, tmpFarbe, sFarbe, &EditColors, customColSet, false);
if (dia->exec())
{
dia->Farbe.setDocument(m_Doc);
/branches/Version13x/Scribus/scribus/cmykfw.h
35,7 → 35,7
Q_OBJECT
 
public:
CMYKChoose( QWidget* parent, ScribusDoc* doc, ScColor orig, QString name, ColorList *Colors, QStringList Cust );
CMYKChoose( QWidget* parent, ScribusDoc* doc, ScColor orig, QString name, ColorList *Colors, QStringList Cust, bool newCol );
~CMYKChoose() {};
virtual void mouseReleaseEvent(QMouseEvent *m);
QColor CMYK2RGB(int c, int m, int y, int k);
81,6 → 81,7
bool CMYKmode;
bool Wsave;
bool dynamic;
bool isNew;
int BlackComp;
ColorList *EColors;
ColorList CurrSwatch;
/branches/Version13x/Scribus/scribus/plugins/colorwheel/cwdialog.cpp
426,7 → 426,7
QStringList tmpsl;
 
beginColor.fromQColor(colorWheel->actualColor);
CMYKChoose* dia = new CMYKChoose(this, m_Doc, beginColor, tr("New Color"), &tmpcl, tmpsl);
CMYKChoose* dia = new CMYKChoose(this, m_Doc, beginColor, tr("New Color"), &tmpcl, tmpsl, true);
if (dia->exec())
userColorInput(dia->Farbe.getRGBColor());
delete dia;