Fixed saving session without objects (to save fixed vocabulary in binary format)
This commit is contained in:
parent
147a8a0dac
commit
9d0c03f661
@ -406,7 +406,7 @@ void MainWindow::loadSession()
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QMessageBox::information(this, tr("Session loaded!"), tr("Session \"%1\" successfully loaded (%2 objects)!").arg(path).arg(objWidgets_.size()));
|
QMessageBox::information(this, tr("Session loaded!"), tr("Session \"%1\" successfully loaded (%2 objects, %3 vocabulary words)!").arg(path).arg(objWidgets_.size()).arg(findObject_->vocabulary()->size()));
|
||||||
|
|
||||||
if(!camera_->isRunning() && !sceneImage_.empty())
|
if(!camera_->isRunning() && !sceneImage_.empty())
|
||||||
{
|
{
|
||||||
@ -417,8 +417,6 @@ void MainWindow::loadSession()
|
|||||||
}
|
}
|
||||||
void MainWindow::saveSession()
|
void MainWindow::saveSession()
|
||||||
{
|
{
|
||||||
if(objWidgets_.size())
|
|
||||||
{
|
|
||||||
QString path = QFileDialog::getSaveFileName(this, tr("Save session..."), Settings::workingDirectory(), "*.bin");
|
QString path = QFileDialog::getSaveFileName(this, tr("Save session..."), Settings::workingDirectory(), "*.bin");
|
||||||
if(!path.isEmpty())
|
if(!path.isEmpty())
|
||||||
{
|
{
|
||||||
@ -429,8 +427,7 @@ void MainWindow::saveSession()
|
|||||||
|
|
||||||
if(findObject_->saveSession(path))
|
if(findObject_->saveSession(path))
|
||||||
{
|
{
|
||||||
QMessageBox::information(this, tr("Session saved!"), tr("Session \"%1\" successfully saved (%2 objects)!").arg(path).arg(objWidgets_.size()));
|
QMessageBox::information(this, tr("Session saved!"), tr("Session \"%1\" successfully saved (%2 objects, %3 vocabulary words)!").arg(path).arg(objWidgets_.size()).arg(findObject_->vocabulary()->size()));
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user