Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Plasma Mobile
Angelfish
Commits
08c0e551
Commit
08c0e551
authored
Mar 08, 2020
by
Rinigus Saar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drop all subpages before adding a new
parent
5df16729
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
src/contents/ui/webbrowser.qml
src/contents/ui/webbrowser.qml
+10
-2
No files found.
src/contents/ui/webbrowser.qml
View file @
08c0e551
...
...
@@ -80,6 +80,7 @@ Kirigami.ApplicationWindow {
Kirigami.Action
{
icon.name
:
"
tab-duplicate
"
onTriggered
:
{
popSubPages
();
pageStack
.
push
(
Qt
.
resolvedUrl
(
"
Tabs.qml
"
))
}
text
:
i18n
(
"
Tabs
"
)
...
...
@@ -94,6 +95,7 @@ Kirigami.ApplicationWindow {
Kirigami.Action
{
icon.name
:
"
bookmarks
"
onTriggered
:
{
popSubPages
();
pageStack
.
push
(
Qt
.
resolvedUrl
(
"
Bookmarks.qml
"
))
}
text
:
i18n
(
"
Bookmarks
"
)
...
...
@@ -101,6 +103,7 @@ Kirigami.ApplicationWindow {
Kirigami.Action
{
icon.name
:
"
view-history
"
onTriggered
:
{
popSubPages
();
pageStack
.
push
(
Qt
.
resolvedUrl
(
"
History.qml
"
))
}
text
:
i18n
(
"
History
"
)
...
...
@@ -109,6 +112,7 @@ Kirigami.ApplicationWindow {
icon.name
:
"
configure
"
text
:
i18n
(
"
Settings
"
)
onTriggered
:
{
popSubPages
();
pageStack
.
push
(
Qt
.
resolvedUrl
(
"
SettingsPage.qml
"
))
}
}
...
...
@@ -377,8 +381,7 @@ Kirigami.ApplicationWindow {
// drop all sub pages as soon as the browser window is the
// focussed one
if
(
webBrowser
.
pageStack
.
currentIndex
===
0
)
while
(
webBrowser
.
pageStack
.
depth
>
1
)
webBrowser
.
pageStack
.
pop
();
popSubPages
();
}
}
...
...
@@ -395,4 +398,9 @@ Kirigami.ApplicationWindow {
}
Component.onCompleted
:
rootPage
.
initialized
=
true
function
popSubPages
()
{
while
(
webBrowser
.
pageStack
.
depth
>
1
)
webBrowser
.
pageStack
.
pop
();
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment