summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7bce5fe)
raw | patch | inline | side by side (parent: 7bce5fe)
author | rwst <rwst@users.sourceforge.net> | |
Sun, 21 May 2006 15:50:27 +0000 (15:50 +0000) | ||
committer | rwst <rwst@users.sourceforge.net> | |
Sun, 21 May 2006 15:50:27 +0000 (15:50 +0000) |
src/ui/widget/color-picker.cpp | patch | blob | history |
index 883370aec00d63e0f5531794810be3d37a1ab5ff..f79334e317d293d94c87bce0ca409d825ac58177 100644 (file)
#include "color-picker.h"
+static bool _in_use = false;
+
namespace Inkscape {
namespace UI {
namespace Widget {
g_signal_connect(G_OBJECT(_colorSelector), "dragged",
G_CALLBACK(sp_color_picker_color_mod), (void *)this);
+ g_signal_connect(G_OBJECT(_colorSelector), "released",
+ G_CALLBACK(sp_color_picker_color_mod), (void *)this);
g_signal_connect(G_OBJECT(_colorSelector), "changed",
G_CALLBACK(sp_color_picker_color_mod), (void *)this);
void
ColorPicker::setRgba32 (guint32 rgba)
{
+ if (_in_use) return;
+
_preview.setRgba32 (rgba);
_rgba = rgba;
if (_colorSelector)
void
sp_color_picker_color_mod(SPColorSelector *csel, GObject *cp)
{
+ if (_in_use) return;
+ else _in_use = true;
+
SPColor color;
float alpha;
csel->base->getColorAlpha(color, &alpha);
sp_document_done(sp_desktop_document(SP_ACTIVE_DESKTOP));
ptr->on_changed (rgba);
+ _in_use = false;
ptr->_changed_signal.emit (rgba);
+ ptr->_rgba = rgba;
}