diff options
author | Thomas White <taw@physics.org> | 2014-04-28 16:09:44 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2014-04-28 16:09:44 +0200 |
commit | b64bb055ea6f49a3f01a77f92148a9ca5e8767db (patch) | |
tree | 0aa48b25584b160f5a88c4461b4ebabfc5a8083b | |
parent | b9abb0d1a81904a15041e9fbb07f2223f388f1a6 (diff) |
cell_explorer: Add upper limit to the number of bins
-rw-r--r-- | src/cell_explorer.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/cell_explorer.c b/src/cell_explorer.c index b0ccf12b..1087ce54 100644 --- a/src/cell_explorer.c +++ b/src/cell_explorer.c @@ -1065,9 +1065,11 @@ static gint keypress_sig(GtkWidget *widget, GdkEventKey *event, HistoBox *h) /* I'm too lazy to press shift */ if ( (event->keyval == GDK_plus) || (event->keyval == GDK_equal) ) { - h->n *= 2; - scan_cells(h->parent); - gtk_widget_queue_draw(h->da); + if ( h->n < 100000 ) { + h->n *= 2; + scan_cells(h->parent); + gtk_widget_queue_draw(h->da); + } } if ( (event->keyval == GDK_minus) && (h->n > 1) ) { |