Skip to content

Commit 7da0869

Browse files
committed
Apply range only when no other selection was performed (#44)
1 parent ef612f2 commit 7da0869

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

scripts/JSRootPainter.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5651,8 +5651,9 @@
56515651
this.zoom_ymax = (hmax == null) ? this.ymax : hmax;
56525652
}
56535653

5654-
// apply selected user range
5655-
if ((this.histo.fXaxis.fFirst !== this.histo.fXaxis.fLast) &&
5654+
// apply selected user range if no other range selection was done
5655+
if (this.is_main_painter() && (this.zoom_xmin === this.zoom_xmax) &&
5656+
(this.histo.fXaxis.fFirst !== this.histo.fXaxis.fLast) &&
56565657
((this.histo.fXaxis.fFirst>1) || (this.histo.fXaxis.fLast <= this.nbinsx))) {
56575658
this.zoom_xmin = this.histo.fXaxis.fFirst > 1 ? this.GetBinX(this.histo.fXaxis.fFirst-1) : this.xmin;
56585659
this.zoom_xmax = this.histo.fXaxis.fLast <= this.nbinsx ? this.GetBinX(this.histo.fXaxis.fLast) : this.xmax;

0 commit comments

Comments
 (0)