diff --git a/OpenRoadEd/Qt/SettingsWidgets/SettingsJunction.cpp b/OpenRoadEd/Qt/SettingsWidgets/SettingsJunction.cpp index 48efd192d430356a4bf78fa7149f59b4e505294b..f8c21b938afc6c36bfe25745778087287be85fde 100644 --- a/OpenRoadEd/Qt/SettingsWidgets/SettingsJunction.cpp +++ b/OpenRoadEd/Qt/SettingsWidgets/SettingsJunction.cpp @@ -110,6 +110,7 @@ void SettingsJunction::CreateRoadsPressed(void) } } mRoadTree->SelectJunction(junction_index); + mRoadTree->CollapseSelection(); if(errors!=0) { QMessageBox messageBox; diff --git a/OpenRoadEd/Qt/SettingsWidgets/SettingsLane.cpp b/OpenRoadEd/Qt/SettingsWidgets/SettingsLane.cpp index b70e8e87118ad46ceeb427107bc98034245c7206..205f073671b978147b347cb120805ce42b084df5 100644 --- a/OpenRoadEd/Qt/SettingsWidgets/SettingsLane.cpp +++ b/OpenRoadEd/Qt/SettingsWidgets/SettingsLane.cpp @@ -228,4 +228,4 @@ void SettingsLane::SuccessorIdChanged(int value) { // Sets the new value mLane->SetSuccessor(value); -} \ No newline at end of file +} diff --git a/OpenRoadEd/Qt/Tree/RoadTree.cpp b/OpenRoadEd/Qt/Tree/RoadTree.cpp index f9a335b75667a7b8e9a977b8b88e45e9e10228aa..cdb66612d3140a099532ab3ad830e87b591fa91d 100644 --- a/OpenRoadEd/Qt/Tree/RoadTree.cpp +++ b/OpenRoadEd/Qt/Tree/RoadTree.cpp @@ -2075,6 +2075,16 @@ void RoadTree::LoadStructure(OpenDrive *openDrive) connect(mTreeWidget, SIGNAL(itemSelectionChanged()), this, SLOT(OnItemSelected())); } +void RoadTree::ExpandSelection(void) +{ + this->OnExpandPressed(); +} + +void RoadTree::CollapseSelection(void) +{ + this->OnCollapsePressed(); +} + /** * Method called when an item in the road tree is clicked */ diff --git a/OpenRoadEd/Qt/Tree/RoadTree.h b/OpenRoadEd/Qt/Tree/RoadTree.h index e5b7ad029176bd7448c017bc999bcd3661a276fd..444e8720e83b53786bd0f9142ed61ceefaa83601 100644 --- a/OpenRoadEd/Qt/Tree/RoadTree.h +++ b/OpenRoadEd/Qt/Tree/RoadTree.h @@ -366,6 +366,8 @@ public: JunctionPriorityRoad* GetRealJunctionPriority(int indexJunction, int indexPriority); JunctionController* GetRealJunctionController(int indexJunction, int indexController); + void ExpandSelection(void); + void CollapseSelection(void); private: /**