From ceb5881a2f2f5e5d1609549a78071938cfdd07ad Mon Sep 17 00:00:00 2001 From: R E Broadley Date: Thu, 25 Nov 2021 11:36:52 +0100 Subject: [PATCH] Make network graph slider easier to use --- src/qt/forms/debugwindow.ui | 4 ++-- src/qt/rpcconsole.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/qt/forms/debugwindow.ui b/src/qt/forms/debugwindow.ui index 15e0d3fad99..e2ed6307e8d 100644 --- a/src/qt/forms/debugwindow.ui +++ b/src/qt/forms/debugwindow.ui @@ -633,10 +633,10 @@ 1 - 288 + 12 - 12 + 2 6 diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp index 0c3332ab761..47337b9d0d0 100644 --- a/src/qt/rpcconsole.cpp +++ b/src/qt/rpcconsole.cpp @@ -1129,8 +1129,8 @@ void RPCConsole::scrollToEnd() void RPCConsole::on_sldGraphRange_valueChanged(int value) { - const int multiplier = 5; // each position on the slider represents 5 min - int mins = value * multiplier; + static const std::vector values{1, 2, 5, 10, 20, 30, 60, 2*60, 3*60, 6*60, 12*60, 24*60}; + int mins = values[value-1]; setTrafficGraphRange(mins); }