diff --git a/data/gui.xml b/data/gui.xml
index 8783285d8..659836458 100644
--- a/data/gui.xml
+++ b/data/gui.xml
@@ -1043,6 +1043,7 @@
+
diff --git a/data/pref.xml b/data/pref.xml
index 6e7f29e21..4c447ffdd 100644
--- a/data/pref.xml
+++ b/data/pref.xml
@@ -608,6 +608,7 @@
+
diff --git a/data/strings/en.ini b/data/strings/en.ini
index 5889f5b74..dd39024d8 100644
--- a/data/strings/en.ini
+++ b/data/strings/en.ini
@@ -441,6 +441,7 @@ SetPlaybackSpeed = Playback Speed {0}x
SetSameInk = Same Ink in All Tools
ShowAutoGuides = Show Auto Guides
ShowBrushPreview = Show Brush Preview
+ShowBrushPreviewInPreview = Show Brush Preview in Preview
ShowBrushes = Show Brushes
ShowDynamics = Show Dynamics
ShowExtras = Show Extras
@@ -1167,6 +1168,7 @@ view_show_onion_skin = Show &Onion Skin
view_timeline = &Timeline
view_preview = Previe&w
view_preview_hide_other_layers = &Hide Other Layers
+view_preview_brush_preview = &Brush Preview
view_advanced_mode = &Advanced Mode
view_full_screen_mode = &Full Screen Mode
view_full_screen_preview = F&ull Screen Preview
@@ -1425,6 +1427,7 @@ brush_preview_edges = Edges Only
brush_preview_full = Full Preview
brush_preview_fullall = Full Preview with All Tools
brush_preview_fullnedges = Full Preview and Edges
+brush_preview_in_preview = Brush Preview in Preview
cursor_color_type = Crosshair && Brush Edges Color:
cursor_neg_bw = Negative Black and White
cursor_specific_color = Specific Color
diff --git a/src/app/commands/cmd_show.cpp b/src/app/commands/cmd_show.cpp
index 53e80152d..baa7ccafc 100644
--- a/src/app/commands/cmd_show.cpp
+++ b/src/app/commands/cmd_show.cpp
@@ -148,6 +148,24 @@ protected:
}
};
+class ShowBrushPreviewInPreviewCommand : public Command {
+public:
+ ShowBrushPreviewInPreviewCommand()
+ : Command(CommandId::ShowBrushPreviewInPreview(), CmdUIOnlyFlag) {
+ }
+
+protected:
+ bool onChecked(Context* ctx) override {
+ DocumentPreferences& docPref = Preferences::instance().document(ctx->activeDocument());
+ return docPref.show.brushPreviewInPreview();
+ }
+
+ void onExecute(Context* ctx) override {
+ DocumentPreferences& docPref = Preferences::instance().document(ctx->activeDocument());
+ docPref.show.brushPreviewInPreview(!docPref.show.brushPreviewInPreview());
+ }
+};
+
class ShowAutoGuidesCommand : public Command {
public:
ShowAutoGuidesCommand()
@@ -232,6 +250,11 @@ Command* CommandFactory::createShowBrushPreviewCommand()
return new ShowBrushPreviewCommand;
}
+Command* CommandFactory::createShowBrushPreviewInPreviewCommand()
+{
+ return new ShowBrushPreviewInPreviewCommand;
+}
+
Command* CommandFactory::createShowAutoGuidesCommand()
{
return new ShowAutoGuidesCommand;
diff --git a/src/app/commands/commands_list.h b/src/app/commands/commands_list.h
index 583ff4446..2e339f359 100644
--- a/src/app/commands/commands_list.h
+++ b/src/app/commands/commands_list.h
@@ -145,6 +145,7 @@ FOR_EACH_COMMAND(SetPlaybackSpeed)
FOR_EACH_COMMAND(SetSameInk)
FOR_EACH_COMMAND(ShowAutoGuides)
FOR_EACH_COMMAND(ShowBrushPreview)
+FOR_EACH_COMMAND(ShowBrushPreviewInPreview)
FOR_EACH_COMMAND(ShowExtras)
FOR_EACH_COMMAND(ShowGrid)
FOR_EACH_COMMAND(ShowLayerEdges)
diff --git a/src/app/ui/editor/editor.cpp b/src/app/ui/editor/editor.cpp
index 5d60196c4..83b0568c6 100644
--- a/src/app/ui/editor/editor.cpp
+++ b/src/app/ui/editor/editor.cpp
@@ -704,13 +704,15 @@ void Editor::drawOneSpriteUnclippedRect(ui::Graphics* g, const gfx::Rect& sprite
ExtraCelRef extraCel = m_document->extraCel();
if (extraCel &&
- extraCel->type() != render::ExtraType::NONE) {
- m_renderEngine->setExtraImage(
- extraCel->type(),
- extraCel->cel(),
- extraCel->image(),
- extraCel->blendMode(),
- m_layer, m_frame);
+ extraCel->type() != render::ExtraType::NONE &&
+ (!m_docView->isPreview() ||
+ m_docPref.show.brushPreviewInPreview())) {
+ m_renderEngine->setExtraImage(extraCel->type(),
+ extraCel->cel(),
+ extraCel->image(),
+ extraCel->blendMode(),
+ m_layer,
+ m_frame);
}
// Render background first (e.g. new ShaderRenderer will paint the