Merge lp:~rpadovani/webbrowser-app/1378975 into lp:webbrowser-app

Proposed by Riccardo Padovani
Status: Merged
Approved by: Olivier Tilloy
Approved revision: 762
Merged at revision: 771
Proposed branch: lp:~rpadovani/webbrowser-app/1378975
Merge into: lp:webbrowser-app
Diff against target: 16 lines (+4/-2)
1 file modified
src/app/webbrowser/Chrome.qml (+4/-2)
To merge this branch: bzr merge lp:~rpadovani/webbrowser-app/1378975
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Needs Fixing
Olivier Tilloy Approve
Review via email: mp+237661@code.launchpad.net

Commit message

Fixed #1378975 - Fast double click on menu button opens menu twice

Description of the change

Fixed #1378975 - Fast double click on menu button opens menu twice

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Olivier Tilloy (osomon) wrote :

Thanks for the bug report and your work on this!

While your patch works, it can be simplified: there is no need to introduce a new property to check whether there is already a menu being open. Instead, just do the following:

    onTriggered: {
        if (!internal.openDrawer) {
            internal.openDrawer = drawerComponent.createObject(chrome)
            internal.openDrawer.opened = true
        }
    }

(internal.openDrawer gets reset to null as soon as the menu is closed)

review: Needs Fixing
lp:~rpadovani/webbrowser-app/1378975 updated
761. By Riccardo Padovani

Better implementation of the fix

Revision history for this message
Riccardo Padovani (rpadovani) wrote :

You're totally right, thanks for the suggestion :-)

Updated!

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Olivier Tilloy (osomon) wrote :

That looks good, thanks!
Could you please revert the meaningless changes to webbrowser-app.pot ?

lp:~rpadovani/webbrowser-app/1378975 updated
762. By Riccardo Padovani

Revert unwanted changes

Revision history for this message
Riccardo Padovani (rpadovani) wrote :

Done, sorry, I alwasy forget that bzr by default commit all files :/

Revision history for this message
Olivier Tilloy (osomon) wrote :

Thanks!

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/app/webbrowser/Chrome.qml'
2--- src/app/webbrowser/Chrome.qml 2014-10-02 13:22:13 +0000
3+++ src/app/webbrowser/Chrome.qml 2014-10-09 07:37:48 +0000
4@@ -143,8 +143,10 @@
5 }
6
7 onTriggered: {
8- internal.openDrawer = drawerComponent.createObject(chrome)
9- internal.openDrawer.opened = true
10+ if (!internal.openDrawer) {
11+ internal.openDrawer = drawerComponent.createObject(chrome)
12+ internal.openDrawer.opened = true
13+ }
14 }
15 }
16 }

Subscribers

People subscribed via source and target branches

to status/vote changes: