Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2015-12-21 11:26:15 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-12-21 11:26:15 +0300
commit39d11352e08cb3f8f0802275c67c847f64d8fd0b (patch)
treede4ecec5efe49cf512e8e412044ea861ff60ee83 /source
parent5fef3c3326dabbe5330647208212ce7ceb311168 (diff)
UI: fix minor glitch copying small float value
Would copy 0.0 when button displayed 0.0000001.
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/interface/interface_handlers.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c
index 47dccd072c2..f71dcc06933 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -2252,9 +2252,9 @@ static void ui_but_copy_paste(bContext *C, uiBut *but, uiHandleButtonData *data,
}
else if (mode == 'c') {
/* Get many decimal places, then strip trailing zeros.
- * note: too high values start to give strange results (6 or so is ok) */
+ * note: too high values start to give strange results */
char buf_copy[UI_MAX_DRAW_STR];
- ui_but_string_get_ex(but, buf_copy, sizeof(buf_copy), 6);
+ ui_but_string_get_ex(but, buf_copy, sizeof(buf_copy), UI_PRECISION_FLOAT_MAX);
BLI_str_rstrip_float_zero(buf_copy, '\0');
WM_clipboard_text_set(buf_copy, 0);