Skip to content

Commit

Permalink
update QgsColorButton after setting a new color
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@6254 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Dec 15, 2006
1 parent 59a45d2 commit 228a6c3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/gui/qgscolorbutton.cpp
Expand Up @@ -53,3 +53,9 @@ void QgsColorButton::paintEvent(QPaintEvent *e)
p.fillRect(r, mColor);
}
}

void QgsColorButton::setColor(const QColor &color)
{
mColor = color;
update();
}
2 changes: 1 addition & 1 deletion src/gui/qgscolorbutton.h
Expand Up @@ -24,7 +24,7 @@ class QgsColorButton: public QToolButton
QgsColorButton(QWidget *parent = 0);
~QgsColorButton();

void setColor(const QColor &color) { mColor = color; }
void setColor(const QColor &color);
QColor color() const { return mColor; }

protected:
Expand Down

0 comments on commit 228a6c3

Please sign in to comment.