[chessx-developer] patch: Newly created games are not exported on PGN database - ID: 1835687
Chess Database and PGN viewer
Brought to you by:
hognose
From: Gandelli A. <gan...@gm...> - 2009-04-18 23:32:03
|
Hi all, i'm looking at the bug in the title. I think the problem is that in clipboard database m_isOpen is set to false. Assuming that clipboard is the only database without name (as in mainWindow::databaseName) we can safely let it open. If this is wrong, tell me please the right way to handle it. Here is a not very tested workaround: Index: src/database/pgndatabase.cpp =================================================================== --- src/database/pgndatabase.cpp (revisione 890) +++ src/database/pgndatabase.cpp (copia locale) @@ -42,7 +42,8 @@ return false; } m_filename = filename; - if (openFile(filename) && parseFile()) { + // empty filename is only for clipboard + if (filename.isEmpty() || (openFile(filename) && parseFile()) ) { m_isOpen = true; return true; } |