Commit 8a3bc866 authored by Halla Rempt's avatar Halla Rempt

BUG:347798 Don't truncate fractional brush sizes on eraser switch

Patch by Alexey Elnatanov. Thanks!
parent a71c6cdd
......@@ -839,7 +839,7 @@ void KisPaintopBox::slotToggleEraseMode(bool checked)
// remember brush size. set the eraser size to the normal brush size if not set
normalBrushSize = m_sliderChooser[0]->getWidget<KisDoubleSliderSpinBox>("size")->value();
if (!eraserBrushSize)
if (qFuzzyIsNull(eraserBrushSize))
eraserBrushSize = normalBrushSize;
......@@ -866,7 +866,7 @@ void KisPaintopBox::slotToggleEraseMode(bool checked)
//update value in UI (this is the main place the value is 'stored' in memory)
int updateSize = checked ? eraserBrushSize : normalBrushSize;
qreal updateSize = checked ? eraserBrushSize : normalBrushSize;
......@@ -197,8 +197,8 @@ private:
QString m_currCompositeOpID;
KisNodeWSP m_previousNode;
int normalBrushSize; // when toggling between eraser mode
int eraserBrushSize;
qreal normalBrushSize; // when toggling between eraser mode
qreal eraserBrushSize;
KisAction* m_hMirrorAction;
KisAction* m_vMirrorAction;
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