Commit 0637a424 authored by Boudewijn Rempt's avatar Boudewijn Rempt

Don't enable the opacity and darken curve options by default, they have a very

interesting effect when working with the mouse.

svn path=/trunk/koffice/; revision=876674
parent 83d5d671
......@@ -19,8 +19,8 @@
#include "kis_curve_option.h"
#include "widgets/kcurve.h"
KisCurveOption::KisCurveOption(const QString & label, const QString& name)
: KisPaintOpOption(label)
KisCurveOption::KisCurveOption(const QString & label, const QString& name, bool checked)
: KisPaintOpOption(label, checked)
, m_customCurve(false)
, m_name( name )
{
......
......@@ -42,7 +42,7 @@ class PAINTOP_EXPORT KisCurveOption : public KisPaintOpOption
public:
KisCurveOption(const QString & label, const QString& name);
KisCurveOption(const QString & label, const QString& name, bool checked = true);
void writeOptionSetting(KisPropertiesConfiguration* setting) const;
......
......@@ -23,7 +23,7 @@
#include <KoColorSpace.h>
KisPressureDarkenOption::KisPressureDarkenOption()
: KisCurveOption(i18n("Darken"), "Darken")
: KisCurveOption(i18n("Darken"), "Darken", false)
{
}
......
......@@ -23,7 +23,7 @@
#include <KoColorSpace.h>
KisPressureOpacityOption::KisPressureOpacityOption()
: KisCurveOption(i18n("Opacity"), "Opacity")
: KisCurveOption(i18n("Opacity"), "Opacity", false)
{
}
......
......@@ -230,10 +230,19 @@ void KisPaintopBox::slotCurrentNodeChanged(KisNodeSP node)
}
}
void KisPaintopBox::updateOptionWidget()
const KoID& KisPaintopBox::currentPaintop()
{
return m_currentID[KoToolManager::instance()->currentInputDevice()];
}
void KisPaintopBox::setCurrentPaintop(const KoID & paintop)
{
m_currentID[KoToolManager::instance()->currentInputDevice()] = paintop;
const KisPaintOpPresetSP preset =
activePreset(currentPaintop(), KoToolManager::instance()->currentInputDevice());
dbgUI << "active preset for paintop " << paintop.id() << " is " << preset;
if (preset != 0 && preset->settings() && preset->settings()->widget()) {
m_optionWidget = preset->settings()->widget();
......@@ -243,21 +252,8 @@ void KisPaintopBox::updateOptionWidget()
} else {
m_presetsPopup->setPaintOpSettingsWidget(0);
}
}
const KoID& KisPaintopBox::currentPaintop()
{
return m_currentID[KoToolManager::instance()->currentInputDevice()];
}
void KisPaintopBox::setCurrentPaintop(const KoID & paintop)
{
m_currentID[KoToolManager::instance()->currentInputDevice()] = paintop;
updateOptionWidget();
KisPaintOpPresetSP preset = activePreset(paintop, KoToolManager::instance()->currentInputDevice());
dbgUI << "active preset for paintop " << paintop.id() << " is " << preset;
if(preset->settings()) {
// XXX: Clean this up for 2.1, when the settings won't have a pointer to their widget anymore
preset->settings()->widget()->setConfiguration(preset->settings());
......
......@@ -79,7 +79,6 @@ private slots:
private:
QPixmap paintopPixmap(const KoID & paintop);
void updateOptionWidget();
const KoID & currentPaintop();
void setCurrentPaintop(const KoID & paintop);
KoID defaultPaintop(const KoInputDevice & inputDevice);
......
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