Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/interface/interface_region_color_picker.cc
| Show First 20 Lines • Show All 865 Lines • ▼ Show 20 Lines | |||||
| uiBlock *ui_block_func_COLOR(bContext *C, uiPopupBlockHandle *handle, void *arg_but) | uiBlock *ui_block_func_COLOR(bContext *C, uiPopupBlockHandle *handle, void *arg_but) | ||||
| { | { | ||||
| uiBut *but = static_cast<uiBut *>(arg_but); | uiBut *but = static_cast<uiBut *>(arg_but); | ||||
| uiBlock *block; | uiBlock *block; | ||||
| bool show_picker = true; | bool show_picker = true; | ||||
| block = UI_block_begin(C, handle->region, __func__, UI_EMBOSS); | block = UI_block_begin(C, handle->region, __func__, UI_EMBOSS); | ||||
| /* T60609: Enable UNDO flag when values are edited. */ | |||||
campbellbarton: This line should have a comment that the undo flag gets enabled, with a reference to T60609. | |||||
campbellbartonUnsubmitted Done Inline ActionsNormally these kinds of comments don't use the bug as tag, something like this is more in keeping with our current code style. /* NOTE: The undo flag is enabled if values are edited, see: T60609. */ campbellbarton: Normally these kinds of comments don't use the bug as tag, something like this is more in… | |||||
| UI_but_flag_disable(but, UI_BUT_UNDO); | |||||
| if (ui_but_is_color_gamma(but)) { | if (ui_but_is_color_gamma(but)) { | ||||
| block->is_color_gamma_picker = true; | block->is_color_gamma_picker = true; | ||||
| } | } | ||||
| if (but->block) { | if (but->block) { | ||||
| /* if color block is invoked from a popup we wouldn't be able to set color properly | /* if color block is invoked from a popup we wouldn't be able to set color properly | ||||
| * this is because color picker will close popups first and then will try to figure | * this is because color picker will close popups first and then will try to figure | ||||
| Show All 30 Lines | |||||
This line should have a comment that the undo flag gets enabled, with a reference to T60609.