Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IDLE - TreeWidget draw and double-click (Ubuntu) #50421

Closed
sirgimp mannequin opened this issue Jun 2, 2009 · 7 comments
Closed

IDLE - TreeWidget draw and double-click (Ubuntu) #50421

sirgimp mannequin opened this issue Jun 2, 2009 · 7 comments
Assignees
Labels
3.7 (EOL) end of life topic-IDLE type-bug An unexpected behavior, bug, or error

Comments

@sirgimp
Copy link
Mannequin

sirgimp mannequin commented Jun 2, 2009

BPO 6171
Nosy @terryjreedy, @serwy
Files
  • idle_classbrowser.patch
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/terryjreedy'
    closed_at = <Date 2020-06-06.22:18:47.424>
    created_at = <Date 2009-06-02.00:46:51.818>
    labels = ['expert-IDLE', 'type-bug', '3.7']
    title = 'IDLE - TreeWidget draw and double-click (Ubuntu)'
    updated_at = <Date 2020-06-06.22:18:47.424>
    user = 'https://bugs.python.org/sirgimp'

    bugs.python.org fields:

    activity = <Date 2020-06-06.22:18:47.424>
    actor = 'terry.reedy'
    assignee = 'terry.reedy'
    closed = True
    closed_date = <Date 2020-06-06.22:18:47.424>
    closer = 'terry.reedy'
    components = ['IDLE']
    creation = <Date 2009-06-02.00:46:51.818>
    creator = 'sirgimp'
    dependencies = []
    files = ['16168']
    hgrepos = []
    issue_num = 6171
    keywords = ['patch']
    message_count = 7.0
    messages = ['88699', '99005', '229434', '229503', '233577', '233603', '296281']
    nosy_count = 6.0
    nosy_names = ['terry.reedy', 'roger.serwy', 'sirgimp', 'Serge', 'Saimadhav.Heblikar', 'Vandana.Rao']
    pr_nums = []
    priority = 'normal'
    resolution = 'works for me'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue6171'
    versions = ['Python 3.6', 'Python 3.7']

    @sirgimp
    Copy link
    Mannequin Author

    sirgimp mannequin commented Jun 2, 2009

    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.

    @sirgimp sirgimp mannequin added the type-bug An unexpected behavior, bug, or error label Jun 2, 2009
    @Serge
    Copy link
    Mannequin

    Serge mannequin commented Feb 7, 2010

    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)

    @Serge Serge mannequin added the topic-IDLE label Feb 7, 2010
    @serwy serwy mannequin changed the title Class Browser selection in Ubuntu IDLE - Class Browser selection in Ubuntu Jul 16, 2012
    @VandanaRao
    Copy link
    Mannequin

    VandanaRao mannequin commented Oct 15, 2014

    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.

    @terryjreedy
    Copy link
    Member

    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.)

    @terryjreedy terryjreedy changed the title IDLE - Class Browser selection in Ubuntu IDLE - TreeWidget draw and double-click (Ubuntu) Oct 15, 2014
    @SaimadhavHeblikar
    Copy link
    Mannequin

    SaimadhavHeblikar mannequin commented Jan 7, 2015

    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.

    @terryjreedy
    Copy link
    Member

    It appears that this could be closed then. But I would like to look at the patch first if I can get to it.

    @terryjreedy
    Copy link
    Member

    (In 3.6, TreeWidget.py became tree.py.)
    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.

    Tree.py 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 tree.py immediately, as I intend to try using ttk.Treeview as a replacement. But we might instead update tree.py with ttk components. In the meanwhile, I will leave this open.

    @terryjreedy terryjreedy added the 3.7 (EOL) end of life label Jun 18, 2017
    @terryjreedy terryjreedy self-assigned this Jun 18, 2017
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.7 (EOL) end of life topic-IDLE type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant