# HG changeset patch # User John Tsiombikas # Date 1450329734 -7200 # Node ID 9f75208b81cd11624885d56037272f590be46f63 # Parent bf78387a99259b08917dcac5bae662d46af5c22a allow panning while inserting control points don't scale text with the viewport diff -r bf78387a9925 -r 9f75208b81cd src/app.cc --- a/src/app.cc Thu Dec 17 07:10:10 2015 +0200 +++ b/src/app.cc Thu Dec 17 07:22:14 2015 +0200 @@ -79,9 +79,6 @@ if(new_curve) { draw_curve(new_curve); } - if(weight_label) { - weight_label->draw(); - } #ifdef DRAW_MOUSE_POINTER glPointSize(6.0); @@ -90,6 +87,13 @@ glVertex2f(mouse_pointer.x, mouse_pointer.y); glEnd(); #endif + + glMatrixMode(GL_MODELVIEW); + glLoadIdentity(); + + if(weight_label) { + weight_label->draw(); + } } static void draw_grid(float sz, float sep, float alpha) @@ -379,11 +383,9 @@ if(new_curve) { new_curve->move_point(new_curve->size() - 1, snap(uv)); post_redisplay(); - return; } - // from this point on we're definitely not in new-curve mode - if(!bnstate) { + if(!new_curve && !bnstate) { // not dragging, highlight curve under mouse point_hit_test(uv, &hover_curve, &sel_pidx); post_redisplay(); diff -r bf78387a9925 -r 9f75208b81cd src/curve.h --- a/src/curve.h Thu Dec 17 07:10:10 2015 +0200 +++ b/src/curve.h Thu Dec 17 07:22:14 2015 +0200 @@ -43,9 +43,6 @@ Vector2 interpolate(float t, CurveType type) const; Vector2 interpolate(float t) const; Vector2 operator ()(float t) const; - - void draw(int res = -1) const; - void draw_cp(float sz = -1.0f) const; }; #endif // CURVE_H_