Skip to content

Commit

Permalink
Merge pull request #1169 from vladisslav2011/iq_tool_list_scrollbar_fix
Browse files Browse the repository at this point in the history
IQ Tool: Fix jumpy scrollbar of IQ player
  • Loading branch information
argilo authored Nov 10, 2022
2 parents 23c6ad1 + 4d0bdb2 commit 3e3b22f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions resources/news.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
NEW: Restore FFT zoom level between sessions.
NEW: Restore peak detect & peak hold between sessions.
FIXED: Remove empty frame from bottom of I/Q tool window.
FIXED: Sudden scrolling of file list in I/Q tool window.
IMPROVED: AGC performance.


Expand Down
4 changes: 4 additions & 0 deletions src/qtgui/iq_tool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include <QString>
#include <QStringList>
#include <QTime>
#include <QScrollBar>

#include <math.h>

Expand Down Expand Up @@ -302,6 +303,8 @@ void CIqTool::timeoutFunction(void)
void CIqTool::refreshDir()
{
int selection = ui->listWidget->currentRow();
QScrollBar * sc = ui->listWidget->verticalScrollBar();
int lastScroll = sc->sliderPosition();

recdir->refresh();
QStringList files = recdir->entryList();
Expand All @@ -310,6 +313,7 @@ void CIqTool::refreshDir()
ui->listWidget->clear();
ui->listWidget->insertItems(0, files);
ui->listWidget->setCurrentRow(selection);
sc->setSliderPosition(lastScroll);
ui->listWidget->blockSignals(false);

if (is_recording)
Expand Down

0 comments on commit 3e3b22f

Please sign in to comment.