This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: IDLE - TreeWidget draw and double-click (Ubuntu)
Type: behavior Stage: resolved
Components: IDLE Versions: Python 3.7, Python 3.6
Status: closed Resolution: works for me
Dependencies: Superseder:
Assigned To: terry.reedy Nosy List: Saimadhav.Heblikar, Serge, Vandana.Rao, roger.serwy, sirgimp, terry.reedy
Priority: normal Keywords: patch

Created on 2009-06-02 00:46 by sirgimp, last changed 2022-04-11 14:56 by admin. This issue is now closed.

File name Uploaded Description Edit
idle_classbrowser.patch Serge, 2010-02-07 15:43
Messages (7)
msg88699 - (view) Author: Jason Gervich (sirgimp) Date: 2009-06-02 00:46
When sing IDLE in Ubuntu (Jaunty) if you open the Class Browser and
double click on a class or function name, the corresponding section is
highlighted in the code in the Editor Window. 

If you again double click on another class or function name, the new
code section should be highlighted in the Editor Window but isn't.
Nothing happens. You have to first close the Class Browser window,
reopen it and double click on another name to select it the Editor Window.

In the Windows versions, successive double clicking will highlight the
desired selection in the Class Browser window.
msg99005 - (view) Author: (Serge) Date: 2010-02-07 15:43
TreeNode class which is used in IDLE class browser create a window for a text label on each single click and apparently under Ubuntu tcl looses first left button click and therefore doesn't generate left buttond double click event. 

In this patch I make changes to the TreeNode class so it creates a window for a text label only when needed (i.e. during initialization or when it was delete after "collapse" command)
msg229434 - (view) Author: Vandana Rao (Vandana.Rao) * Date: 2014-10-15 11:29
This issue doesn't describe the above situation on Ubuntu 14.04.
I use IDLE 3.4.0 and Python 3.4.0. When the Class browser is opened and if the function name or class name is double clicked, it highlights the corresponding section in the editor. It's perfectly working when we do same action on different function names or class names without opening class browser another time.
msg229503 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2014-10-15 22:11
Jason or Serge, does this issue still exist with a current release (3.4.2 or 2.7.8) with a recent tcl/tk.  (The Tk version is listed on About Idle.)
msg233577 - (view) Author: Saimadhav Heblikar (Saimadhav.Heblikar) * Date: 2015-01-07 11:36
Behavior described in msg229434 is right. Tested on Ubuntu 14.04 64bit with Python version  3.5.0a, TkVersion=8.5 and TclVersion=8.5.
msg233603 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2015-01-07 20:51
It appears that this could be closed then.  But I would like to look at the patch first if I can get to it.
msg296281 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2017-06-18 17:49
(In 3.6, became
Even though IDLE trees now appear to work correctly, including on Ubuntu, I am concerned about possible memory leaks, which are usually detected by repeatedly running a module's test file.  Test_tree does not leak now, but it does not do much. In particular, it does not expand and contract items and move selections.  TreeNode.draw has this note: "This leaks bindings until canvas is deleted", and I wonder if the same could be true in .drawtext. currently has these notes at the top:
# - keep track of object ids to allow more careful cleaning
# - optimize tree redraw after expand of subnode
Currently, self.text_id is saved, but not used.  Reusing canvas items should be more efficient.

I won't edit immediately, as I intend to try using ttk.Treeview as a replacement.  But we might instead update with ttk components.  In the meanwhile, I will leave this open.
Date User Action Args
2022-04-11 14:56:49adminsetgithub: 50421
2020-06-06 22:18:47terry.reedysetstatus: open -> closed
resolution: works for me
stage: patch review -> resolved
2017-06-18 17:49:58terry.reedysetassignee: terry.reedy
messages: + msg296281
versions: + Python 3.6, Python 3.7, - Python 2.7, Python 3.4, Python 3.5
2015-01-07 20:51:52terry.reedysetmessages: + msg233603
2015-01-07 11:36:08Saimadhav.Heblikarsetmessages: + msg233577
2014-10-15 22:41:10terry.reedysettitle: IDLE - Class Browser selection in Ubuntu -> IDLE - TreeWidget draw and double-click (Ubuntu)
2014-10-15 22:11:12terry.reedysetmessages: + msg229503
2014-10-15 11:29:39Vandana.Raosetnosy: + Vandana.Rao
messages: + msg229434
2014-10-14 14:59:25Saimadhav.Heblikarsetnosy: + Saimadhav.Heblikar
2014-10-03 04:06:57terry.reedysetnosy: + terry.reedy
stage: patch review

versions: + Python 3.4, Python 3.5, - Python 3.1, Python 3.2
2012-07-16 00:37:02roger.serwysetnosy: + roger.serwy

title: Class Browser selection in Ubuntu -> IDLE - Class Browser selection in Ubuntu
2010-08-04 03:39:31terry.reedysetversions: + Python 3.1, Python 3.2, - Python 2.6, Python 2.5, Python 3.0
2010-02-07 15:43:13Sergesetfiles: + idle_classbrowser.patch

nosy: + Serge
messages: + msg99005

components: + IDLE
keywords: + patch
2009-06-02 00:46:51sirgimpcreate