[Scummvm-cvs-logs] SF.net SVN: scummvm: [25887] scummvm/trunk/gui/PopUpWidget.cpp

eriktorbjorn at users.sourceforge.net eriktorbjorn at users.sourceforge.net
Mon Feb 26 23:38:26 CET 2007


Revision: 25887
          http://scummvm.svn.sourceforge.net/scummvm/?rev=25887&view=rev
Author:   eriktorbjorn
Date:     2007-02-26 14:38:24 -0800 (Mon, 26 Feb 2007)

Log Message:
-----------
Measure the "open time" from when the pop-up dialog was first drawn, not from
when it was created. This should fix bug #1667992.

Modified Paths:
--------------
    scummvm/trunk/gui/PopUpWidget.cpp

Modified: scummvm/trunk/gui/PopUpWidget.cpp
===================================================================
--- scummvm/trunk/gui/PopUpWidget.cpp	2007-02-26 20:50:33 UTC (rev 25886)
+++ scummvm/trunk/gui/PopUpWidget.cpp	2007-02-26 22:38:24 UTC (rev 25887)
@@ -143,8 +143,7 @@
 	_clickX = clickX - _x;
 	_clickY = clickY - _y;
 
-	// Time the popup was opened
-	_openTime = getMillis();
+	_openTime = 0;
 }
 
 void PopUpDialog::drawDialog() {
@@ -164,6 +163,11 @@
 	/*if (_twoColumns && (count & 1)) {
 		g_gui.fillRect(_x + 1 + _w / 2, _y + 1 + kLineHeight * (_entriesPerColumn - 1), _w / 2 - 1, kLineHeight, g_gui._bgcolor);
 	}*/
+
+	if (_openTime == 0) {
+		// Time the popup was opened
+		_openTime = getMillis();
+	}
 }
 
 void PopUpDialog::handleMouseUp(int x, int y, int button, int clickCount) {


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list