Commit 9327616e authored by Ludovic Fauvet's avatar Ludovic Fauvet

Wizard: auto-select the open radio button when needed

parent bccc1bc4
......@@ -37,6 +37,8 @@ WelcomePage::WelcomePage( QWidget* parent )
connect( m_ui.openPushButton, SIGNAL( clicked() ),
this, SLOT( loadProject() ) );
connect( m_ui.projectsListWidget, SIGNAL( itemActivated(QListWidgetItem*) ),
this, SLOT( selectOpenRadio() ) );
loadRecentsProjects();
}
......@@ -99,6 +101,8 @@ void WelcomePage::loadProject()
ProjectManager* pm = ProjectManager::getInstance();
QString projectPath = pm->loadProjectFile();
if ( projectPath.isEmpty() ) return;
QListWidgetItem* item = NULL;
for ( int i = 0; i < m_ui.projectsListWidget->count(); ++i )
{
......@@ -118,4 +122,10 @@ void WelcomePage::loadProject()
}
item->setSelected( true );
selectOpenRadio();
}
void WelcomePage::selectOpenRadio()
{
m_ui.openRadioButton->setChecked( true );
}
......@@ -49,6 +49,7 @@ class WelcomePage : public QWizardPage
private slots:
void loadProject();
void loadRecentsProjects();
void selectOpenRadio();
private:
Ui::WelcomePage m_ui;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment