kopia lustrzana https://github.com/f4exb/sdrangel
				
				
				
			Fixed keyboard input for negative values on realtive integer value dials (issue #168)
							rodzic
							
								
									0c946d86e2
								
							
						
					
					
						commit
						4bb63bbf1b
					
				|  | @ -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")); | ||||
|  |  | |||
|  | @ -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)); | ||||
|  |  | |||
|  | @ -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)); | ||||
|  |  | |||
|  | @ -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 | ||||
|  |  | |||
|  | @ -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++; | ||||
| 
 | ||||
|  |  | |||
		Ładowanie…
	
		Reference in New Issue
	
	 f4exb
						f4exb