Update of /cvsroot/audacity/audacity-src/src/widgets
In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv13256

Modified Files:
        AButton.cpp 
Log Message:
Correct state handling

Index: AButton.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/widgets/AButton.cpp,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -d -r1.39 -r1.40
--- AButton.cpp 29 Jun 2006 09:35:27 -0000      1.39
+++ AButton.cpp 3 Jul 2007 09:09:31 -0000       1.40
@@ -183,7 +183,12 @@
          }
       }
       else {
-         state = mIsClicking ? AButtonDown : AButtonOver;
+         if (mIsClicking) {
+            state = mButtonIsDown ? AButtonOver : AButtonDown;
+         }
+         else {
+            state = mButtonIsDown ? AButtonDown : AButtonUp;
+         }
       }
    }
    else {
@@ -191,7 +196,7 @@
          state = mButtonIsDown ? AButtonDown : AButtonUp;
       }
       else {
-         state = AButtonUp;
+         state = mButtonIsDown ? AButtonDown : AButtonUp;
       }
    }
          
@@ -264,7 +269,7 @@
          if (mCursorIsInWindow && (mToggle || !mButtonIsDown)) {
             SetFocus();
                
-            if(mToggle)
+            if (mToggle)
                mButtonIsDown = !mButtonIsDown;
             else
                mButtonIsDown = true;


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Audacity-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/audacity-cvs

Reply via email to