mirror of
https://github.com/overte-org/overte.git
synced 2025-04-25 21:36:12 +02:00
Make tool window closable
This commit is contained in:
parent
8ed5ea8605
commit
79e6aaf17f
1 changed files with 3 additions and 9 deletions
|
@ -13,7 +13,7 @@ Windows.Window {
|
|||
objectName: "ToolWindow"
|
||||
destroyOnCloseButton: false
|
||||
destroyOnInvisible: false
|
||||
closable: false
|
||||
closable: true
|
||||
visible: false
|
||||
width: 384; height: 640;
|
||||
property string newTabSource
|
||||
|
@ -54,17 +54,12 @@ Windows.Window {
|
|||
}
|
||||
|
||||
function updateVisiblity() {
|
||||
var newVisible = false
|
||||
console.log("Checking " + tabView.count + " children")
|
||||
for (var i = 0; i < tabView.count; ++i) {
|
||||
if (tabView.getTab(i).enabled) {
|
||||
console.log("Tab " + i + " enabled");
|
||||
newVisible = true;
|
||||
break;
|
||||
return;
|
||||
}
|
||||
}
|
||||
console.log("Setting toolWindow visible: " + newVisible);
|
||||
visible = newVisible
|
||||
visible = false;
|
||||
}
|
||||
|
||||
function findIndexForUrl(source) {
|
||||
|
@ -127,7 +122,6 @@ Windows.Window {
|
|||
|
||||
var title = properties.title || "Unknown";
|
||||
newTabSource = properties.source;
|
||||
console.log(typeof(properties.source))
|
||||
var newTab = tabView.addTab(title, webTabCreator);
|
||||
newTab.active = true;
|
||||
newTab.enabled = false;
|
||||
|
|
Loading…
Reference in a new issue