From kde-commits Wed May 31 19:02:13 2017 From: Allen Marshall Date: Wed, 31 May 2017 19:02:13 +0000 To: kde-commits Subject: [krita] /: Fixed bug where changing tools would disable size and flow sliders Message-Id: X-MARC-Message: https://marc.info/?l=kde-commits&m=149625734425097 Git commit eb7fae70bb4bcfe6a967d45b23ccc5f8d8065f90 by Allen Marshall. Committed on 17/05/2017 at 23:31. Pushed by allenmarshall into branch 'master'. Fixed bug where changing tools would disable size and flow sliders M +2 -2 libs/ui/kis_paintop_box.cc M +2 -1 libs/ui/tool/kis_tool_freehand.cc M +2 -1 libs/ui/tool/kis_tool_shape.cc M +0 -5 plugins/tools/basictools/kis_tool_line.cc M +0 -1 plugins/tools/basictools/kis_tool_line.h https://commits.kde.org/krita/eb7fae70bb4bcfe6a967d45b23ccc5f8d8065f90 diff --git a/libs/ui/kis_paintop_box.cc b/libs/ui/kis_paintop_box.cc index 5e3c69954c3..7981cec3266 100644 --- a/libs/ui/kis_paintop_box.cc +++ b/libs/ui/kis_paintop_box.cc @@ -1090,11 +1090,11 @@ void KisPaintopBox::slotToolChanged(KoCanvasControl= ler* canvas, int toolId) } = if (flags & KisTool::FLAG_USES_CUSTOM_PRESET) { - setWidgetState(ENABLE_PRESETS | ENABLE_SIZE | ENABLE_FLOW); + setWidgetState(ENABLE_PRESETS); slotUpdatePreset(); m_presetsEnabled =3D true; } else { - setWidgetState(DISABLE_PRESETS | DISABLE_SIZE | DISABLE_FLOW); + setWidgetState(DISABLE_PRESETS); m_presetsEnabled =3D false; } = diff --git a/libs/ui/tool/kis_tool_freehand.cc b/libs/ui/tool/kis_tool_free= hand.cc index d843c15b947..47b93df9667 100644 --- a/libs/ui/tool/kis_tool_freehand.cc +++ b/libs/ui/tool/kis_tool_freehand.cc @@ -149,7 +149,8 @@ void KisToolFreehand::resetHelper(KisToolFreehandHelper= *helper) = int KisToolFreehand::flags() const { - return KisTool::FLAG_USES_CUSTOM_COMPOSITEOP|KisTool::FLAG_USES_CUSTOM= _PRESET; + return KisTool::FLAG_USES_CUSTOM_COMPOSITEOP|KisTool::FLAG_USES_CUSTOM= _PRESET + |KisTool::FLAG_USES_CUSTOM_SIZE; } = void KisToolFreehand::activate(ToolActivation activation, const QSet &shapes) diff --git a/libs/ui/tool/kis_tool_shape.cc b/libs/ui/tool/kis_tool_shape.cc index 97e6ef1c2a5..306a84a9143 100644 --- a/libs/ui/tool/kis_tool_shape.cc +++ b/libs/ui/tool/kis_tool_shape.cc @@ -71,7 +71,8 @@ void KisToolShape::activate(ToolActivation toolActivation= , const QSet = int KisToolShape::flags() const { - return KisTool::FLAG_USES_CUSTOM_COMPOSITEOP|KisTool::FLAG_USES_CUSTOM= _PRESET; + return KisTool::FLAG_USES_CUSTOM_COMPOSITEOP|KisTool::FLAG_USES_CUSTOM= _PRESET + |KisTool::FLAG_USES_CUSTOM_SIZE; } = QWidget * KisToolShape::createOptionWidget() diff --git a/plugins/tools/basictools/kis_tool_line.cc b/plugins/tools/basi= ctools/kis_tool_line.cc index bcb1607db87..770498df962 100644 --- a/plugins/tools/basictools/kis_tool_line.cc +++ b/plugins/tools/basictools/kis_tool_line.cc @@ -79,11 +79,6 @@ KisToolLine::~KisToolLine() { } = -int KisToolLine::flags() const -{ - return KisTool::FLAG_USES_CUSTOM_COMPOSITEOP|KisTool::FLAG_USES_CUSTOM= _PRESET; -} - void KisToolLine::resetCursorStyle() { KisToolPaint::resetCursorStyle(); diff --git a/plugins/tools/basictools/kis_tool_line.h b/plugins/tools/basic= tools/kis_tool_line.h index e9db2097f2e..281b4b03562 100644 --- a/plugins/tools/basictools/kis_tool_line.h +++ b/plugins/tools/basictools/kis_tool_line.h @@ -60,7 +60,6 @@ public: void activate(ToolActivation activation, const QSet &shapes)= override; void deactivate() override; = - int flags() const override; void paint(QPainter& gc, const KoViewConverter &converter) override; = QString quickHelp() const override;