From 8c34e888b50ecbf306ae85e384439a9961944eea Mon Sep 17 00:00:00 2001 From: gambas Date: Tue, 17 Jul 2018 22:29:04 +0200 Subject: [PATCH] TreeView: Canceling the Rename event keeps the editor opened. [GB.GUI.BASE] * NEW: TreeView: Canceling the Rename event keeps the editor opened. --- comp/src/gb.gui.base/.src/TreeView/_TreeView.class | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/comp/src/gb.gui.base/.src/TreeView/_TreeView.class b/comp/src/gb.gui.base/.src/TreeView/_TreeView.class index 6fe193ef1..d6849852c 100644 --- a/comp/src/gb.gui.base/.src/TreeView/_TreeView.class +++ b/comp/src/gb.gui.base/.src/TreeView/_TreeView.class @@ -1252,6 +1252,8 @@ End Private Sub Cancel(Optional bOK As Boolean) Dim sCursor As String + Dim bStop As Boolean + Dim hItem As _TreeView_Item If Not $hRenameBox Then Return @@ -1262,13 +1264,15 @@ Private Sub Cancel(Optional bOK As Boolean) sCursor = $sCursor $sCursor = $sKeyRenaming If bOK Then - Raise Rename + bStop = Raise Rename Else Raise Cancel Endif $sCursor = sCursor + hItem = $cItem[$sKeyRenaming] $sKeyRenaming = "" + If bStop Then _Rename(hItem, $iColRenaming) End