Skip to content
Snippets Groups Projects
Commit db8a20bc authored by Eike Ziller's avatar Eike Ziller Committed by Tobias Hunger
Browse files

Select current kit when managing kits from projects mode


Change-Id: I65a540ef93d4d3a99829171e7b21138acb2d681e
Reviewed-by: default avatarTobias Hunger <tobias.hunger@nokia.com>
parent 5efc4cf0
No related branches found
No related tags found
No related merge requests found
......@@ -123,11 +123,14 @@ QWidget *KitOptionsPage::createPage(QWidget *parent)
updateState();
if (m_toShow)
m_selectionModel->select(m_model->indexOf(m_toShow),
if (m_toShow) {
QModelIndex index = m_model->indexOf(m_toShow);
m_selectionModel->select(index,
QItemSelectionModel::Clear
| QItemSelectionModel::SelectCurrent
| QItemSelectionModel::Rows);
m_kitsView->scrollTo(index);
}
m_toShow = 0;
return m_configWidget;
......
......@@ -31,6 +31,7 @@
#include "targetsettingspanel.h"
#include "buildsettingspropertiespage.h"
#include "kitoptionspage.h"
#include "project.h"
#include "projectwindow.h"
#include "runsettingspropertiespage.h"
......@@ -348,6 +349,13 @@ void TargetSettingsPanelWidget::renameTarget()
void TargetSettingsPanelWidget::openTargetPreferences()
{
int targetIndex = m_selector->currentIndex();
if (targetIndex >= 0 && targetIndex < m_targets.size()) {
ProjectExplorer::KitOptionsPage *page =
ExtensionSystem::PluginManager::instance()->getObject<ProjectExplorer::KitOptionsPage>();
if (page)
page->showKit(m_targets.at(targetIndex)->kit());
}
Core::ICore::showOptionsDialog(QLatin1String(Constants::PROJECTEXPLORER_SETTINGS_CATEGORY),
QLatin1String(Constants::KITS_SETTINGS_PAGE_ID));
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment