Skip to content

Commit

Permalink
Fix plugin window status getting confused when there are multiple tabs
Browse files Browse the repository at this point in the history
(cherry picked from commit b07ec3e)
  • Loading branch information
timangus committed Jul 1, 2022
1 parent f4fd634 commit dc0fedf
Showing 1 changed file with 18 additions and 7 deletions.
25 changes: 18 additions & 7 deletions source/app/ui/qml/TabUI.qml
Original file line number Diff line number Diff line change
Expand Up @@ -1259,13 +1259,13 @@ Item
{
id: window
section: "window"
property alias pluginX: pluginWindow.x
property alias pluginY: pluginWindow.y
property var pluginX
property var pluginY
property var pluginWidth
property var pluginHeight
property var pluginMaximised
property alias pluginSplitSize: root.pluginSplitSize
property alias pluginPoppedOut: root.pluginPoppedOut
property int pluginSplitSize
property bool pluginPoppedOut: false
}

Preferences
Expand Down Expand Up @@ -1387,12 +1387,19 @@ Item

function loadPluginWindowState()
{
if(window.pluginPoppedOut === undefined)
return;

root.pluginPoppedOut = window.pluginPoppedOut;

if(!window.pluginPoppedOut)
return;

if(window.pluginWidth !== undefined &&
window.pluginHeight !== undefined)
{
pluginWindow.x = window.pluginX;
pluginWindow.y = window.pluginY;
pluginWindow.width = window.pluginWidth;
pluginWindow.height = window.pluginHeight;
}
Expand All @@ -1406,13 +1413,17 @@ Item

function savePluginWindowState()
{
window.pluginPoppedOut = root.pluginPoppedOut;

if(!window.pluginPoppedOut)
return;

window.pluginMaximised = pluginWindow.maximised;

if(!pluginWindow.maximised)
{
window.pluginX = pluginWindow.x;
window.pluginY = pluginWindow.y;
window.pluginWidth = pluginWindow.width;
window.pluginHeight = pluginWindow.height;
}
Expand Down Expand Up @@ -1540,10 +1551,10 @@ Item

function togglePop()
{
if(pluginWindow.visible)
popInPlugin();
if(root.pluginPoppedOut)
root.popInPlugin();
else
popOutPlugin();
root.popOutPlugin();
}

function createPluginMenu(index, menu)
Expand Down

0 comments on commit dc0fedf

Please sign in to comment.