Update of /cvsroot/audacity/audacity-src/src/widgets
In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv2856
Modified Files:
AButton.cpp
Log Message:
Bypass double click handling
Index: AButton.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/widgets/AButton.cpp,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -d -r1.41 -r1.42
--- AButton.cpp 3 Jul 2007 17:55:56 -0000 1.41
+++ AButton.cpp 5 Jul 2007 00:01:07 -0000 1.42
@@ -245,7 +245,7 @@
{
wxSize clientSize = GetClientSize();
AButtonState prevState = GetState();
-
+
if (event.Entering())
mCursorIsInWindow = true;
else if (event.Leaving())
@@ -258,9 +258,13 @@
if (HasAlternateImages() && !mButtonIsDown)
mAlternate = event.ShiftDown();
- //If the mouse button is released, the following stuff happens
- if (mEnabled) {
- if (event.ButtonUp() && mIsClicking) {
+ if (mEnabled && event.IsButton()) {
+ if (event.ButtonIsDown(wxMOUSE_BTN_ANY)) {
+ SetFocus();
+ mIsClicking = true;
+ CaptureMouse();
+ }
+ else if (mIsClicking) {
mIsClicking = false;
if (HasCapture())
@@ -280,11 +284,6 @@
Click();
}
}
- else if (event.ButtonDown()) {
- SetFocus();
- mIsClicking = true;
- CaptureMouse();
- }
}
// Only redraw and change tooltips if the state has changed.
-------------------------------------------------------------------------
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