[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdemultimedia/noatun/library
From:       Stefan Gehn <mETz81 () web ! de>
Date:       2007-02-01 2:26:37
Message-ID: 1170296797.225202.3434.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 628959 by metz:

- Only inform about position changes if the position actually changed ;)


 M  +7 -2      player.cpp  


--- trunk/KDE/kdemultimedia/noatun/library/player.cpp #628958:628959
@@ -345,8 +345,13 @@
 {
 	if (d->engine)
 	{
-		d->position = d->engine->position();
-		emit positionChanged(d->position);
+		int newPos = d->engine->position(); // use qMax() to avoid the < 0 case?
+		if (newPos != d->position && newPos >= 0)
+		{
+			//kDebug(66666) << k_funcinfo << "newPos " << newPos << endl;
+			d->position = newPos;
+			emit positionChanged(d->position);
+		}
 	}
 	else
 		kWarning(66666) << k_funcinfo << "called with no engine loaded" << endl;
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic