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
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2021-02-05 09:04:06 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-02-05 09:04:14 +0300
commit38420f19b6ebfac05955dac61200ce686fcd16e5 (patch)
treefb2d1bd5ae78a0947b006da3b57de2c36df827cf /source/blender/editors/interface
parentf2bf5acd5824673e4a7d641c833ec6940e6b5bea (diff)
Cleanup: rename USER_ZOOM_{CONT->CONTINUE} improve comments
USER_ZOOM_CONT only had comments saying this was 'oldstyle', remove these comments, add brief explanations of the zoom style in the enum.
Diffstat (limited to 'source/blender/editors/interface')
-rw-r--r--source/blender/editors/interface/view2d_ops.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/editors/interface/view2d_ops.c b/source/blender/editors/interface/view2d_ops.c
index 6c5e672c6bf..e234ab5dcdc 100644
--- a/source/blender/editors/interface/view2d_ops.c
+++ b/source/blender/editors/interface/view2d_ops.c
@@ -46,7 +46,7 @@
#include "UI_interface.h"
#include "UI_view2d.h"
-#include "PIL_time.h" /* USER_ZOOM_CONT */
+#include "PIL_time.h" /* USER_ZOOM_CONTINUE */
/* -------------------------------------------------------------------- */
/** \name Internal Utilities
@@ -1108,7 +1108,7 @@ static void view_zoomdrag_apply(bContext *C, wmOperator *op)
/* Check if the 'timer' is initialized, as zooming with the trackpad
* never uses the "Continuous" zoom method, and the 'timer' is not initialized. */
- if ((U.viewzoom == USER_ZOOM_CONT) && vzd->timer) { /* XXX store this setting as RNA prop? */
+ if ((U.viewzoom == USER_ZOOM_CONTINUE) && vzd->timer) { /* XXX store this setting as RNA prop? */
const double time = PIL_check_seconds_timer();
const float time_step = (float)(time - vzd->timer_lastdraw);
@@ -1304,7 +1304,7 @@ static int view_zoomdrag_invoke(bContext *C, wmOperator *op, const wmEvent *even
/* add temp handler */
WM_event_add_modal_handler(C, op);
- if (U.viewzoom == USER_ZOOM_CONT) {
+ if (U.viewzoom == USER_ZOOM_CONTINUE) {
/* needs a timer to continue redrawing */
vzd->timer = WM_event_add_timer(CTX_wm_manager(C), window, TIMER, 0.01f);
vzd->timer_lastdraw = PIL_check_seconds_timer();
@@ -1363,7 +1363,7 @@ static int view_zoomdrag_modal(bContext *C, wmOperator *op, const wmEvent *event
dx *= BLI_rctf_size_x(&v2d->cur);
dy *= BLI_rctf_size_y(&v2d->cur);
}
- else { /* USER_ZOOM_CONT or USER_ZOOM_DOLLY */
+ else { /* USER_ZOOM_CONTINUE or USER_ZOOM_DOLLY */
float facx = zoomfac * (event->x - vzd->lastx);
float facy = zoomfac * (event->y - vzd->lasty);
@@ -1410,7 +1410,7 @@ static int view_zoomdrag_modal(bContext *C, wmOperator *op, const wmEvent *event
* - Continuous zoom only depends on distance of mouse
* to starting point to determine rate of change.
*/
- if (U.viewzoom != USER_ZOOM_CONT) { /* XXX store this setting as RNA prop? */
+ if (U.viewzoom != USER_ZOOM_CONTINUE) { /* XXX store this setting as RNA prop? */
vzd->lastx = event->x;
vzd->lasty = event->y;
}