diff --git a/src/settings/ink_type.h b/src/settings/ink_type.h index b50fb5312..482329ae6 100644 --- a/src/settings/ink_type.h +++ b/src/settings/ink_type.h @@ -19,14 +19,17 @@ #ifndef SETTINGS_INK_TYPE_H_INCLUDED #define SETTINGS_INK_TYPE_H_INCLUDED -// If you change this enumeration, you should change update the -// ContextBar::InkTypeField() UI widget +// If you change this enumeration, you should update the +// ContextBar::InkTypeField() UI widget. Also, remember that these +// indexes are loaded/saved from/to the user configuration file, so +// you shouldn't change them. enum InkType { kDefaultInk, kOpaqueInk, kMergeInk, kShadingInk, kReplaceInk, + kEraseInk, kSelectionInk, kBlurInk, kJumbleInk, diff --git a/src/widgets/context_bar.cpp b/src/widgets/context_bar.cpp index 4f5ca5122..904f5eabe 100644 --- a/src/widgets/context_bar.cpp +++ b/src/widgets/context_bar.cpp @@ -251,6 +251,7 @@ public: addItem("Merge"); addItem("Shading"); addItem("Replace"); + addItem("Erase"); addItem("Selection"); addItem("Blur"); addItem("Jumble"); diff --git a/src/widgets/editor/tool_loop_impl.cpp b/src/widgets/editor/tool_loop_impl.cpp index ed012559d..5068f5d21 100644 --- a/src/widgets/editor/tool_loop_impl.cpp +++ b/src/widgets/editor/tool_loop_impl.cpp @@ -271,6 +271,9 @@ private: else id = WellKnownInks::ReplaceFgWithBg; break; + case kEraseInk: + id = WellKnownInks::Eraser; + break; case kSelectionInk: id = WellKnownInks::Selection; break;