You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by jo...@apache.org on 2021/04/21 15:43:13 UTC

[isis] 01/02: fix tab closing

This is an automated email from the ASF dual-hosted git repository.

joergrade pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/isis.git

commit 828d0861904bc2ea225bf8100da4903afadb4aba
Author: Jörg Rade <jo...@kuehne-nagel.com>
AuthorDate: Wed Apr 21 17:42:36 2021 +0200

    fix tab closing
---
 .../src/main/kotlin/org/apache/isis/client/kroviz/ui/kv/RoTabPanel.kt | 4 ++--
 .../src/main/kotlin/org/apache/isis/client/kroviz/ui/kv/RoView.kt     | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/kv/RoTabPanel.kt b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/kv/RoTabPanel.kt
index e31116d..10f58dd 100644
--- a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/kv/RoTabPanel.kt
+++ b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/kv/RoTabPanel.kt
@@ -33,13 +33,13 @@ class RoTabPanel : TabPanel() {
     }
 
     override fun removeTab(index: Int): TabPanel {
-        val tab = getChildren().first()
+        val tab = getTabs().get(index)
         RoView.removeTab(tab as SimplePanel)
         return super.removeTab(index)
     }
 
     fun findTab(title: String): Int? {
-        getChildren().forEachIndexed { index, component ->
+        getTabs().forEachIndexed { index, component ->
             if ((component is VPanel) && (component.title == title)) {
                 return index
             }
diff --git a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/kv/RoView.kt b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/kv/RoView.kt
index b4a1cdb..8152a45 100644
--- a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/kv/RoView.kt
+++ b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/kv/RoView.kt
@@ -39,7 +39,7 @@ object RoView {
         panel.addBsBorder(BsBorder.BORDER)
         val index = tabPanel.findTab(title)
         if (index != null) {
-            val tabs = tabPanel.getChildren()
+            val tabs = tabPanel.getTabs()
             val tab = tabs.get(index) as SimplePanel
             removeTab(tab)
             tabPanel.removeTab(index)
@@ -65,7 +65,7 @@ object RoView {
     fun findActive(): SimplePanel? {
         val index = tabPanel.activeIndex
         if (index > 0) {
-            val tabs = tabPanel.getChildren()
+            val tabs = tabPanel.getTabs()
             val tab = tabs.get(index) as SimplePanel
             return (tab)
         }