~osomon/webbrowser-app/copy-image-to-clipboard

« back to all changes in this revision

Viewing changes to src/app/webbrowser/ContextMenuMobile.qml

  • Committer: Olivier Tilloy
  • Date: 2016-10-28 10:22:51 UTC
  • Revision ID: olivier.tilloy@canonical.com-20161028102251-47clgrnxpmuo4pkq
Delay closing the context model until after the action has been executed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
import com.canonical.Oxide 1.8 as Oxide
24
24
 
25
25
Popups.Dialog {
 
26
    id: contextMenu
 
27
 
26
28
    property QtObject contextModel: model
27
29
    property ActionList actions: null
28
30
 
119
121
                }
120
122
            }
121
123
 
122
 
            onTriggered: contextModel.close()
 
124
            onTriggered: contextMenu.hide()
123
125
        }
124
126
    }
125
127
 
138
140
            fontSize: "x-small"
139
141
            text: i18n.tr("Cancel")
140
142
        }
141
 
        onTriggered: contextModel.close()
 
143
        onTriggered: contextMenu.hide()
 
144
    }
 
145
 
 
146
    onVisibleChanged: {
 
147
        if (!visible) {
 
148
            contextModel.close()
 
149
        }
142
150
    }
143
151
 
144
152
    // adjust default dialog visuals to custom requirements for the context menu