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()
|
||||
{
|
||||
QStringList defaultList;
|
||||
|
||||
@@ -62,6 +62,7 @@ namespace glabels
|
||||
public:
|
||||
void addColor( const QColor &color );
|
||||
QList<QColor> getColors();
|
||||
QColor getColor( int id );
|
||||
|
||||
|
||||
/////////////////////////////////
|
||||
|
||||
@@ -242,7 +242,7 @@ namespace glabels
|
||||
void ColorPaletteDialog::onHistoryItemActivated( int id )
|
||||
{
|
||||
mColorNode.setField( false );
|
||||
mColorNode.setColor( mColorHistory->getColors()[id] );
|
||||
mColorNode.setColor( mColorHistory->getColor(id) );
|
||||
mColorNode.setKey( "" );
|
||||
|
||||
emit colorChanged( mColorNode, false );
|
||||
|
||||
Reference in New Issue
Block a user