mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-14 16:39:57 +00:00
MainWindow Refactor Part 5 of 5 - TABBED ATHLETES
The final part (and one of the reasons) for the mainwindow refactoring -- we now support tabbed athletes rather than having a new mainwindow for each athlete opened. Context is saved/restored and there are new functions for opening and closing tabs and windows of tabs. The tabbar itself is fugly -- the next few days will spend some time looking at making it prettier on Linux/Win and more native on Mac (see MMTabBar).
This commit is contained in:
@@ -95,12 +95,11 @@ void
|
||||
DBAccess::initDatabase(QDir home)
|
||||
{
|
||||
|
||||
|
||||
if(db && db->database(sessionid).isOpen()) return;
|
||||
|
||||
QString cyclist = QFileInfo(home.path()).baseName();
|
||||
sessionid = QString("%1").arg(context->athlete->cyclist);
|
||||
|
||||
if(db && db->database(sessionid).isOpen()) return;
|
||||
|
||||
// use different name for v3 metricDB to avoid constant rebuilding
|
||||
// when switching between v2 stable and v3 development builds
|
||||
db = new QSqlDatabase(QSqlDatabase::addDatabase("QSQLITE", sessionid));
|
||||
|
||||
Reference in New Issue
Block a user