Push temporary color list down into ColorHistory.
This commit is contained in:
@@ -74,6 +74,13 @@ namespace glabels
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
QColor ColorHistory::getColor( int id )
|
||||||
|
{
|
||||||
|
QList<QColor> colors = readColorList();
|
||||||
|
return colors[id];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
QList<QColor> ColorHistory::readColorList()
|
QList<QColor> ColorHistory::readColorList()
|
||||||
{
|
{
|
||||||
QStringList defaultList;
|
QStringList defaultList;
|
||||||
|
|||||||
@@ -62,6 +62,7 @@ namespace glabels
|
|||||||
public:
|
public:
|
||||||
void addColor( const QColor &color );
|
void addColor( const QColor &color );
|
||||||
QList<QColor> getColors();
|
QList<QColor> getColors();
|
||||||
|
QColor getColor( int id );
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////
|
/////////////////////////////////
|
||||||
|
|||||||
@@ -242,7 +242,7 @@ namespace glabels
|
|||||||
void ColorPaletteDialog::onHistoryItemActivated( int id )
|
void ColorPaletteDialog::onHistoryItemActivated( int id )
|
||||||
{
|
{
|
||||||
mColorNode.setField( false );
|
mColorNode.setField( false );
|
||||||
mColorNode.setColor( mColorHistory->getColors()[id] );
|
mColorNode.setColor( mColorHistory->getColor(id) );
|
||||||
mColorNode.setKey( "" );
|
mColorNode.setKey( "" );
|
||||||
|
|
||||||
emit colorChanged( mColorNode, false );
|
emit colorChanged( mColorNode, false );
|
||||||
|
|||||||
Reference in New Issue
Block a user