Fixed bug case when after first creating a layout a list of details was cleared.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2016-08-09 20:53:38 +03:00
parent 0aabacfee4
commit 41308f1468
2 changed files with 2 additions and 4 deletions

View File

@ -1266,7 +1266,6 @@ void MainWindow::CleanLayout()
shadows.clear();
papers.clear();
ui->listWidget->clear();
listDetails.clear();
SetLayoutModeActions();
}
@ -2440,6 +2439,7 @@ void MainWindow::Clear()
QApplication::restoreOverrideCursor();
#endif
CleanLayout();
listDetails.clear(); // don't move to CleanLayout()
#ifdef Q_OS_WIN32
qt_ntfs_permission_lookup--; // turn it off again

View File

@ -92,7 +92,6 @@ void MainWindowsNoGUI::ToolLayoutSettings(bool checked)
{
VLayoutGenerator lGenerator;
DialogLayoutSettings layout(&lGenerator, this);
if (layout.exec() == QDialog::Rejected)
{
@ -458,14 +457,13 @@ void MainWindowsNoGUI::PrintTiled()
//---------------------------------------------------------------------------------------------------------------------
void MainWindowsNoGUI::PrepareDetailsForLayout(const QHash<quint32, VDetail> *details)
{
listDetails.clear();
SCASSERT(details != nullptr)
if (details->count() == 0)
{
listDetails.clear();
return;
}
listDetails.clear();
QHash<quint32, VDetail>::const_iterator i = details->constBegin();
while (i != details->constEnd())
{