Skip to content
Browse files

minor fix

  • Loading branch information...
1 parent 9340349 commit 1176fe92d94685710833db22c60227b051770124 @pchilds committed
Showing with 13 additions and 29 deletions.
  1. +6 −10 gtk2plot/gtkplotlinear.c
  2. +1 −9 gtk2plot/gtkplotpolar.c
  3. +5 −1 gtk3plot/gtkplotlinear.c
  4. +1 −9 gtk3plot/gtkplotpolar.c
View
16 gtk2plot/gtkplotlinear.c
@@ -134,15 +134,7 @@ static void drawz(GtkWidget *widget, cairo_t *cr)
}
}
cairo_stroke(cr);
- if (((plot->zmode)&GTK_PLOT_LINEAR_ZOOM_SGL)!=0)
- {
- cairo_move_to(cr, xw-20, 2);
- cairo_line_to(cr, xw-13, 9);
- cairo_move_to(cr, xw-20, 9);
- cairo_line_to(cr, xw-13, 2);
- cairo_stroke(cr);
- }
- else
+ if (((plot->zmode)&GTK_PLOT_LINEAR_ZOOM_SGL)==0)
{
cairo_save(cr);
dt=1;
@@ -4172,7 +4164,11 @@ static gboolean gtk_plot_linear_button_release(GtkWidget *widget, GdkEventButton
{
if ((event->x)>=xw-11)
{
- if (((plot->zmode)&(GTK_PLOT_LINEAR_ZOOM_DRG|GTK_PLOT_LINEAR_ZOOM_OUT))==0) {(plot->zmode)&=(~GTK_PLOT_LINEAR_ZOOM_SGL); (plot->zmode)|=GTK_PLOT_LINEAR_ZOOM_DRG;}
+ if (((plot->zmode)&(GTK_PLOT_LINEAR_ZOOM_DRG|GTK_PLOT_LINEAR_ZOOM_OUT))==0)
+ {
+ if (((plot->zmode)&(GTK_PLOT_LINEAR_ZOOM_SGL))!=0) (plot->zmode)>>=1;
+ (plot->zmode)|=GTK_PLOT_LINEAR_ZOOM_DRG;
+ }
else (plot->zmode)--;
}
else
View
10 gtk2plot/gtkplotpolar.c
@@ -147,15 +147,7 @@ static void drawz(GtkWidget *widget, cairo_t *cr)
cairo_line_to(cr, xw-3.5, 3.5);
}
cairo_stroke(cr);
- if (((plot->zmode)&GTK_PLOT_POLAR_ZOOM_SGL)!=0)
- {
- cairo_move_to(cr, xw-20, 2);
- cairo_line_to(cr, xw-13, 9);
- cairo_move_to(cr, xw-20, 9);
- cairo_line_to(cr, xw-13, 2);
- cairo_stroke(cr);
- }
- else
+ if (((plot->zmode)&GTK_PLOT_POLAR_ZOOM_SGL)==0)
{
cairo_save(cr);
dt=1;
View
6 gtk3plot/gtkplotlinear.c
@@ -4136,7 +4136,11 @@ static gboolean gtk_plot_linear_button_release(GtkWidget *widget, GdkEventButton
{
if ((event->x)>=xw-11)
{
- if (((plot->zmode)&(GTK_PLOT_LINEAR_ZOOM_DRG|GTK_PLOT_LINEAR_ZOOM_OUT))==0) {(plot->zmode)&=(~GTK_PLOT_LINEAR_ZOOM_SGL); (plot->zmode)|=GTK_PLOT_LINEAR_ZOOM_DRG;}
+ if (((plot->zmode)&(GTK_PLOT_LINEAR_ZOOM_DRG|GTK_PLOT_LINEAR_ZOOM_OUT))==0)
+ {
+ if (((plot->zmode)&(GTK_PLOT_LINEAR_ZOOM_SGL))!=0) (plot->zmode)>>=1;
+ (plot->zmode)|=GTK_PLOT_LINEAR_ZOOM_DRG;
+ }
else (plot->zmode)--;
}
else
View
10 gtk3plot/gtkplotpolar.c
@@ -143,15 +143,7 @@ static void drawz(GtkWidget *widget, cairo_t *cr)
cairo_line_to(cr, xw-3.5, 3.5);
}
cairo_stroke(cr);
- if (((plot->zmode)&GTK_PLOT_POLAR_ZOOM_SGL)!=0)
- {
- cairo_move_to(cr, xw-20, 2);
- cairo_line_to(cr, xw-13, 9);
- cairo_move_to(cr, xw-20, 9);
- cairo_line_to(cr, xw-13, 2);
- cairo_stroke(cr);
- }
- else
+ if (((plot->zmode)&GTK_PLOT_POLAR_ZOOM_SGL)==0)
{
cairo_save(cr);
dt=1;

0 comments on commit 1176fe9

Please sign in to comment.
Something went wrong with that request. Please try again.