T3D 1.1 Preview - Problems with object selection in window and list - RESOLVED (THREED-1784)
by Oscar Velzi · in Torque 3D Professional · 05/04/2011 (11:48 am) · 6 replies
Thread Body:
Build: 1.1 Preview
Platform: Windows XP 32bit
Target: Editors
Issues: When I select an object in the game window (by clicking on the actual object), then select and object in the list on the right, and then select an object in the game window, the object in the list continues selected. PLEASE, fix this, I lost countless objects due to this bug, as I deleted one object and also another one I didn't know that was selected. It's a pain to go over my levels to find that objects that I didn't purposely delete were deleted.
If you can post the fix here, I would be really grateful, I want to avoid cursing at the engine every time this happens :)
Steps to Repeat:
1. Open the deathball FPS example, and load the world editor
2. Select an object in the "game window", basically, by clicking on the mesh.
3. Select another object on the list in the right.
4. Select another object in the "game window", basically, by clicking on the mesh. You will see that the one selected in the list doesn't disappear, so if you press delete, thinking you only had the last object selected, both objects will be deleted.

Build: 1.1 Preview
Platform: Windows XP 32bit
Target: Editors
Issues: When I select an object in the game window (by clicking on the actual object), then select and object in the list on the right, and then select an object in the game window, the object in the list continues selected. PLEASE, fix this, I lost countless objects due to this bug, as I deleted one object and also another one I didn't know that was selected. It's a pain to go over my levels to find that objects that I didn't purposely delete were deleted.
If you can post the fix here, I would be really grateful, I want to avoid cursing at the engine every time this happens :)
Steps to Repeat:
1. Open the deathball FPS example, and load the world editor
2. Select an object in the "game window", basically, by clicking on the mesh.
3. Select another object on the list in the right.
4. Select another object in the "game window", basically, by clicking on the mesh. You will see that the one selected in the list doesn't disappear, so if you press delete, thinking you only had the last object selected, both objects will be deleted.

About the author
Lead Artist of Iron Tower Studio
Recent Threads
#2
The reason for this problem and a number of related problems that have cropped up is some changes in GuiTreeViewCtrl (a rather fickle beast). I'll look at this shortly (I'm the one that has caused these issues) and will post a fix here.
Thanks for the detailed report Oscar! Quite a joy to see something like this.
05/04/2011 (12:26 pm)
Confirmed. THREED-1784.The reason for this problem and a number of related problems that have cropped up is some changes in GuiTreeViewCtrl (a rather fickle beast). I'll look at this shortly (I'm the one that has caused these issues) and will post a fix here.
Thanks for the detailed report Oscar! Quite a joy to see something like this.
#3
05/04/2011 (12:32 pm)
Thanks Rene! This will be a real life saver =)
#4
Replace the beginning of GuiTreeViewCtrl::addSelection, up to the comment included as the last line here, with
And replace the beginning of GuiTreeViewCtrl::removeSelection, up to the "S32 objectId = -1;" line included here, with
05/04/2011 (1:00 pm)
Ok, I'll spare you my curses over the crimes to be found in GuiTreeViewCtrl... instead, here's the fix for the problem above.Replace the beginning of GuiTreeViewCtrl::addSelection, up to the comment included as the last line here, with
void GuiTreeViewCtrl::addSelection( S32 itemOrObjectId, bool update, bool isLastSelection )
{
if (mDebug)
Con::printf( "addSelection %i", itemOrObjectId );
Item* item = _findItemByAmbiguousId( itemOrObjectId );
// Add Item?
if ( !item || isSelected( item ) || !canAddSelection( item ) )
{
// Nope.
return;
}
const S32 itemId = item->getID();
// Ok, we have an item to select which isn't already selected....And replace the beginning of GuiTreeViewCtrl::removeSelection, up to the "S32 objectId = -1;" line included here, with
void GuiTreeViewCtrl::removeSelection( S32 itemOrObjectId )
{
if (mDebug)
Con::printf( "removeSelection %i", itemOrObjectId );
Item* item = _findItemByAmbiguousId( itemOrObjectId, false );
if (!item)
return;
// Make sure we have a true item ID even if we started with
// an object ID.
S32 itemId = item->getID();
S32 objectId = -1;
#5
1- Select two objects in the game window by pressing CTRL and clicking on one and the other.
2- Click directly on a third separate object. You will see that you will have this new one and one of the previous one selected. If press delete, both get deleted.
I don't know if it's related to the previous one, since I'm not touching the list at all plus this one is related to selecting two objects and then another one.
Once again, maybe your code fixes this one too, we haven't been able to implement it yet. Thanks! =)
EDIT: My bad, that does not happen in the preview version, tested it in B3 by mistake.
05/06/2011 (11:23 am)
Couldn't try the fix yet, but found another instance of this issue:1- Select two objects in the game window by pressing CTRL and clicking on one and the other.
2- Click directly on a third separate object. You will see that you will have this new one and one of the previous one selected. If press delete, both get deleted.
I don't know if it's related to the previous one, since I'm not touching the list at all plus this one is related to selecting two objects and then another one.
Once again, maybe your code fixes this one too, we haven't been able to implement it yet. Thanks! =)
EDIT: My bad, that does not happen in the preview version, tested it in B3 by mistake.
#6
05/10/2011 (4:31 pm)
Fixed in 1.1 Final.
Torque Owner Alfio Saitta
Collateral Studios