Fixed bug case when after first creating a layout a list of details was cleared.
--HG-- branch : develop
This commit is contained in:
parent
0aabacfee4
commit
41308f1468
|
@ -1266,7 +1266,6 @@ void MainWindow::CleanLayout()
|
||||||
shadows.clear();
|
shadows.clear();
|
||||||
papers.clear();
|
papers.clear();
|
||||||
ui->listWidget->clear();
|
ui->listWidget->clear();
|
||||||
listDetails.clear();
|
|
||||||
SetLayoutModeActions();
|
SetLayoutModeActions();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2440,6 +2439,7 @@ void MainWindow::Clear()
|
||||||
QApplication::restoreOverrideCursor();
|
QApplication::restoreOverrideCursor();
|
||||||
#endif
|
#endif
|
||||||
CleanLayout();
|
CleanLayout();
|
||||||
|
listDetails.clear(); // don't move to CleanLayout()
|
||||||
|
|
||||||
#ifdef Q_OS_WIN32
|
#ifdef Q_OS_WIN32
|
||||||
qt_ntfs_permission_lookup--; // turn it off again
|
qt_ntfs_permission_lookup--; // turn it off again
|
||||||
|
|
|
@ -92,7 +92,6 @@ void MainWindowsNoGUI::ToolLayoutSettings(bool checked)
|
||||||
{
|
{
|
||||||
VLayoutGenerator lGenerator;
|
VLayoutGenerator lGenerator;
|
||||||
|
|
||||||
|
|
||||||
DialogLayoutSettings layout(&lGenerator, this);
|
DialogLayoutSettings layout(&lGenerator, this);
|
||||||
if (layout.exec() == QDialog::Rejected)
|
if (layout.exec() == QDialog::Rejected)
|
||||||
{
|
{
|
||||||
|
@ -458,14 +457,13 @@ void MainWindowsNoGUI::PrintTiled()
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void MainWindowsNoGUI::PrepareDetailsForLayout(const QHash<quint32, VDetail> *details)
|
void MainWindowsNoGUI::PrepareDetailsForLayout(const QHash<quint32, VDetail> *details)
|
||||||
{
|
{
|
||||||
|
listDetails.clear();
|
||||||
SCASSERT(details != nullptr)
|
SCASSERT(details != nullptr)
|
||||||
if (details->count() == 0)
|
if (details->count() == 0)
|
||||||
{
|
{
|
||||||
listDetails.clear();
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
listDetails.clear();
|
|
||||||
QHash<quint32, VDetail>::const_iterator i = details->constBegin();
|
QHash<quint32, VDetail>::const_iterator i = details->constBegin();
|
||||||
while (i != details->constEnd())
|
while (i != details->constEnd())
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user