Fix T65301: Convert to mesh with Keep Original loses adjust operator panel.
authorBastien Montagne <montagne29@wanadoo.fr>
Sun, 9 Jun 2019 20:53:48 +0000 (22:53 +0200)
committerBastien Montagne <montagne29@wanadoo.fr>
Sun, 9 Jun 2019 20:59:36 +0000 (22:59 +0200)
We need to properly select new objects (and deselect 'source' ones) when
converting to another type while keeping original ones. Otherwise poll
check of the operator fails, and redo panel cannot be shown.

Note that this is actually a design flaw in redo system currently, since
*new* state has to still allow last operator to be ran, when it should
actually be previous step in history that matters here...

source/blender/editors/object/object_add.c

index 5e5537992e420742fc2be40650fbff97bffb38ac..7d54f12df8f49a17f846c8497edd83eeb11b43e9 100644 (file)
@@ -2342,6 +2342,11 @@ static int convert_exec(bContext *C, wmOperator *op)
         basact = basen;
       }
 
         basact = basen;
       }
 
+      if (keep_original) {
+        ED_object_base_select(base, BA_DESELECT);
+        ED_object_base_select(basen, BA_SELECT);
+      }
+
       basen = NULL;
     }
 
       basen = NULL;
     }