[gimp] app: "Registered" alignment makes no sense with self-to-self painting.



commit 370db868a329eda27767ed6634fb9af6b813322c
Author: Jehan <jehan girinstud io>
Date:   Fri Sep 3 19:04:37 2021 +0200

    app: "Registered" alignment makes no sense with self-to-self painting.
    
    The "Registered" alignment is used to paint from one layer to another
    (in same or different image) at exactly the same image coordinates. It
    doesn't make much sense with the self-to-self painting when having
    multiple drawables selected.
    
    Note that it still works with the other new feature using multiple
    layers as a composited source (limited "Sample merged"-like painting,
    but only from specific layers).

 app/paint/gimpsourcecore.c | 7 +++++++
 1 file changed, 7 insertions(+)
---
diff --git a/app/paint/gimpsourcecore.c b/app/paint/gimpsourcecore.c
index e9fb765184..4f6c58c192 100644
--- a/app/paint/gimpsourcecore.c
+++ b/app/paint/gimpsourcecore.c
@@ -257,6 +257,13 @@ gimp_source_core_start (GimpPaintCore     *paint_core,
                                _("Set a source image first."));
           return FALSE;
         }
+      else if (options->align_mode == GIMP_SOURCE_ALIGN_REGISTERED &&
+               g_list_length (drawables) > 1)
+        {
+          g_set_error_literal (error, GIMP_ERROR, GIMP_FAILED,
+                               _("\"Registered\" alignment cannot paint on multiple drawables."));
+          return FALSE;
+        }
 
       if (options->sample_merged         &&
           g_list_length (drawables) == 1 &&


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]