1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-25 09:18:54 -05:00

Fixed keyboard input for negative values on realtive integer value dials (issue #168)

This commit is contained in:
f4exb 2018-05-08 10:10:15 +02:00
parent 0c946d86e2
commit 4bb63bbf1b
5 changed files with 18 additions and 7 deletions

View File

@ -35,7 +35,7 @@ static int runQtApplication(int argc, char* argv[], qtwebapp::LoggerWithFile *lo
*/
QCoreApplication::setOrganizationName("f4exb");
QCoreApplication::setApplicationName("SDRangel");
QCoreApplication::setApplicationVersion("3.14.5");
QCoreApplication::setApplicationVersion("3.14.6");
#if 1
qApp->setStyle(QStyleFactory::create("fusion"));

View File

@ -57,7 +57,7 @@ static int runQtApplication(int argc, char* argv[], qtwebapp::LoggerWithFile *lo
QCoreApplication::setOrganizationName("f4exb");
QCoreApplication::setApplicationName("SDRangelBench");
QCoreApplication::setApplicationVersion("3.14.5");
QCoreApplication::setApplicationVersion("3.14.6");
int catchSignals[] = {SIGQUIT, SIGINT, SIGTERM, SIGHUP};
std::vector<int> vsig(catchSignals, catchSignals + sizeof(catchSignals) / sizeof(int));

View File

@ -56,7 +56,7 @@ static int runQtApplication(int argc, char* argv[], qtwebapp::LoggerWithFile *lo
QCoreApplication::setOrganizationName("f4exb");
QCoreApplication::setApplicationName("SDRangelSrv");
QCoreApplication::setApplicationVersion("3.14.5");
QCoreApplication::setApplicationVersion("3.14.6");
int catchSignals[] = {SIGQUIT, SIGINT, SIGTERM, SIGHUP};
std::vector<int> vsig(catchSignals, catchSignals + sizeof(catchSignals) / sizeof(int));

6
debian/changelog vendored
View File

@ -1,3 +1,9 @@
sdrangel (3.14.6-1) unstable; urgency=medium
* Fixed keyboard input for negative values on realtive integer value dials
-- Edouard Griffiths, F4EXB <f4exb06@gmail.com> Sun, 13 May 2018 20:14:18 +0200
sdrangel (3.14.5-1) unstable; urgency=medium
* DSD demod: allow audio rates integer multiples of 8k other than 48k

View File

@ -599,12 +599,17 @@ void ValueDialZ::keyPressEvent(QKeyEvent* value)
{
int d = c.toLatin1() - '0';
quint64 e = findExponent(m_cursor);
quint64 v = (m_value / e) % 10;
if(m_animationState != 0)
quint64 value = abs(m_value);
int sign = m_value < 0 ? -1 : 1;
quint64 v = (value / e) % 10;
if(m_animationState != 0) {
m_value = m_valueNew;
v = m_value - v * e;
}
v = value - v * e;
v += d * e;
setValue(v);
setValue(sign*v);
emit changed(m_valueNew);
m_cursor++;