diff --git a/data/pref.xml b/data/pref.xml
index d26589afe..0f5236fa6 100644
--- a/data/pref.xml
+++ b/data/pref.xml
@@ -247,6 +247,7 @@
+
diff --git a/data/strings/en.ini b/data/strings/en.ini
index b99fc662f..f715a7630 100644
--- a/data/strings/en.ini
+++ b/data/strings/en.ini
@@ -1055,6 +1055,14 @@ the selection when the mouse is inside it.
END
select_tile_with_double_click = Select a grid tile with double-click
force_rotsprite = Force RotSprite even for right/straight angles
+multicel_when_layers_or_frames = Transform cels in selected layers or frames on timeline
+multicel_when_layers_or_frames_tooltip = <<
+
diff --git a/src/app/ui/editor/pixels_movement.cpp b/src/app/ui/editor/pixels_movement.cpp
index b72b5b538..38ed84641 100644
--- a/src/app/ui/editor/pixels_movement.cpp
+++ b/src/app/ui/editor/pixels_movement.cpp
@@ -172,6 +172,14 @@ PixelsMovement::PixelsMovement(
}
}
+bool PixelsMovement::editMultipleCels() const
+{
+ return
+ (m_site.range().enabled() &&
+ (Preferences::instance().selection.multicelWhenLayersOrFrames() ||
+ m_site.range().type() == DocRange::kCels));
+}
+
void PixelsMovement::setFastMode(const bool fastMode)
{
bool redraw = (m_fastMode && !fastMode);
@@ -977,7 +985,7 @@ CelList PixelsMovement::getEditableCels()
{
CelList cels;
- if (m_site.range().enabled()) {
+ if (editMultipleCels()) {
cels = get_unlocked_unique_cels(
m_site.sprite(), m_site.range());
}
@@ -1004,7 +1012,7 @@ CelList PixelsMovement::getEditableCels()
bool PixelsMovement::gotoFrame(const doc::frame_t deltaFrame)
{
- if (m_site.range().enabled()) {
+ if (editMultipleCels()) {
Layer* layer = m_site.layer();
ASSERT(layer);
diff --git a/src/app/ui/editor/pixels_movement.h b/src/app/ui/editor/pixels_movement.h
index 60e486f1f..9cca7733b 100644
--- a/src/app/ui/editor/pixels_movement.h
+++ b/src/app/ui/editor/pixels_movement.h
@@ -120,6 +120,7 @@ namespace app {
const Transformation& getTransformation() const { return m_currentData; }
private:
+ bool editMultipleCels() const;
void stampImage(bool finalStamp);
void stampExtraCelImage();
void onPivotChange();