Ejemplo n.º 1
0
void HierarchyTreeController::UpdateSelection(const HierarchyTreePlatformNode* activePlatform,
											  const HierarchyTreeScreenNode* activeScreen)
{
	bool updateLibrary = false;
	if (this->activePlatform != activePlatform)
	{
		updateLibrary = true;
		ResetSelectedControl();
		this->activePlatform = (HierarchyTreePlatformNode*)activePlatform;
		if (this->activePlatform)
			this->activePlatform->ActivatePlatform();

        // The platform is changed - update the Localization System.
        UpdateLocalization(false);
		emit SelectedPlatformChanged(this->activePlatform);
	}
	if (this->activeScreen != activeScreen)
	{
		updateLibrary = true;
		if (this->activeScreen)
			this->activeScreen->RemoveSelection();
		
		ResetSelectedControl();
		this->activeScreen = (HierarchyTreeScreenNode*)activeScreen;
		emit SelectedScreenChanged(this->activeScreen);
	}
	if (updateLibrary)
		LibraryController::Instance()->UpdateLibrary();
}
Ejemplo n.º 2
0
void Robot::ReadAndUpdateLocalization() {
	Read();
	UpdateLocalization();
}