Fix T51772: double undo entry for color picker editing.
authorBrecht Van Lommel <brechtvanlommel@gmail.com>
Sun, 2 Jul 2017 19:25:25 +0000 (21:25 +0200)
committerBrecht Van Lommel <brechtvanlommel@gmail.com>
Sun, 2 Jul 2017 19:27:41 +0000 (21:27 +0200)
source/blender/editors/interface/interface_regions.c

index 534bd4278ca32cfa53833e5facdc5dd83f6c15c9..5ed944747263419c73616bd0968fc53c333bfa1b 100644 (file)
@@ -2099,9 +2099,11 @@ static void ui_update_color_picker_buts_rgb(uiBlock *block, ColorPicker *cpicker
                        continue;
 
                if (bt->rnaprop) {
-                       
                        ui_but_v3_set(bt, rgb);
                        
+                       /* original button that created the color picker already does undo
+                        * push, so disable it on RNA buttons in the color picker block */
+                       UI_but_flag_disable(bt, UI_BUT_UNDO);
                }
                else if (STREQ(bt->str, "Hex: ")) {
                        float rgb_gamma[3];