Création d'un compte pour un collaborateur extérieur au laboratoire depuis l'intranet ICube : https://intranet.icube.unistra.fr/fr/labs/member/profile

Commit bc5e99c3 authored by Frédéric Larue's avatar Frédéric Larue
Browse files

Bug fixed in the management of recent project list.

parent c7f58866
......@@ -140,18 +140,25 @@ void UIMainWindow::updateRecentListEntry( const QString& path )
else
return;
// Insert the path to the beginning of the list.
if( m_RecentProjects.empty() )
ui->menuFile->insertAction( ui->menuFile->actions().back(), newFirstEntry );
else
ui->menuFile->insertAction( m_RecentProjects.front(), newFirstEntry );
m_RecentProjects.push_front( newFirstEntry );
// If the list of recent project exceeds the maximum size allowed, remove its very last element.
if( m_RecentProjects.size() > RECENT_PROJECT_MAX_LIST_SIZE )
{
ui->menuFile->removeAction( m_RecentProjects.back() );
m_RecentProjects.back()->deleteLater();
m_RecentProjects.pop_back();
}
// If the inserted path is the first one, insert a separator before it in the menu.
if( isVeryFirstEntry )
ui->menuFile->insertSeparator( ui->menuFile->actions().back() );
}
......
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