Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Selecting outside treeview items

    SDK Help
    0
    2
    231
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      Helper
      last edited by

      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

      On 29/10/2005 at 03:15, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   9.1 
      Platform:      
      Language(s) :     C++  ;

      ---------
      Hi,

      This might be a bit complicated

      I have a TreeView gadget that is currently populated by 700 items.

      Each of these items is in fact a BaseObject that I create in memory that I dont insert into the document.

      I then use the BaseContainer of each of these virtual objects to store data regarding the treeview state.

      One important part of these BaseContainers is that I have set a link to point to an object thats already in the document.

      Then when the user clicks on a treeview item, I check the link in the basecontainer, make sure its valid, and use doc->SetActiveObject() to select the object.

      I do this inside the TreeViewFunctions::Select Method.

      now I have a problem, it works fine but if I click on a item OUTSIDE the treeview list (for example, if all the items are collapsed, and i click below the last item)

      My treeview goes on a frenzy and calls Select for every 700 items in the treeview, thus creating a massive slow down as the plugin is busy processing all the items

      I can't work out why the treeview executes the Select method so many times.
      Its fine when the user actually click a valid item in the treeview, Select is called around 3 times which is fine.

      1 Reply Last reply Reply Quote 0
      • H
        Helper
        last edited by

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        On 29/10/2005 at 07:50, xxxxxxxx wrote:

        I think I have worked out what is happening.

        When you click an invalid item in the treeview, the treeview attempts to de-select everything, so it calls TreeViewFunction::Select() for every object while passing SELECTION_SUB as the mode parameter

        1 Reply Last reply Reply Quote 0
        • First post
          Last post