This Trac instance is not used for development anymore!

We migrated our development workflow to git and Gitea.
To test the future redirection, replace trac by ariadne in the page URL.

Changeset 9604 for ps


Ignore:
Timestamp:
06/09/11 19:30:34 (14 years ago)
Author:
philip
Message:

Fix #805 more so it doesn't ignore the second click on non-double-clickable buttons.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ps/trunk/source/gui/IGUIButtonBehavior.cpp

    r9593 r9604  
    6363        {
    6464            m_Pressed = false;
    65             // BUTTON WAS CLICKED
    6665            if (Message.type == GUIM_MOUSE_RELEASE_LEFT)
    6766            {
     67                // Button was clicked
    6868                SendEvent(GUIM_PRESSED, "press");
    6969            }
    70             // BUTTON WAS DOUBLE CLICKED
    7170            else
    7271            {
    73                 if (SendEvent(GUIM_DOUBLE_PRESSED, "doublepress") == IN_PASS)
    74                     SendEvent(GUIM_PRESSED, "press");
     72                // Button was clicked a second time. We can't tell if the button
     73                // expects to receive doublepress events or just a second press
     74                // event, so send both of them (and assume the extra unwanted press
     75                // is harmless on buttons that expect doublepress)
     76                SendEvent(GUIM_PRESSED, "press");
     77                SendEvent(GUIM_DOUBLE_PRESSED, "doublepress");
    7578            }
    7679        }
Note: See TracChangeset for help on using the changeset viewer.