Commit cf17b818 authored by Boudewijn Rempt's avatar Boudewijn Rempt

Fix initialization of the color picker factory

parent 9dbae80b
......@@ -272,4 +272,13 @@ bool KisScreenColorPickingEventFilter::eventFilter(QObject *, QEvent *event)
return false;
}
std::function<KisScreenColorPickerBase *(QWidget *)> KisDlgInternalColorSelector::s_screenColorPickerFactory = KisScreenColorPicker::createScreenColorPicker;
// Register the color picker factory with the internal color selector
struct ColorPickerRegistrar {
ColorPickerRegistrar()
{
KisDlgInternalColorSelector::setScreenColorPickerFactory(KisScreenColorPicker::createScreenColorPicker);
}
};
static ColorPickerRegistrar s_colorPickerRegistrar;
......@@ -39,11 +39,14 @@ class KRITAWIDGETS_EXPORT KisDlgInternalColorSelector : public QDialog
{
Q_OBJECT
public:
static std::function<KisScreenColorPickerBase *(QWidget *)> s_screenColorPickerFactory;
public:
static void setScreenColorPickerFactory(std::function<KisScreenColorPickerBase *(QWidget *)> f) {
s_screenColorPickerFactory = f;
}
struct Config
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment