Index: src/globals.h
===================================================================
--- src/globals.h	(revision 140109febbe61154ab1fa1349111d72d891f83bb)
+++ src/globals.h	(revision 1fbf016a095b6f072d0f2640e55791f938a8d843)
@@ -46,4 +46,10 @@
 //! Default number of cities
 #define DEF_NUM_CITIES 5
+//! Default value for showing or not solution step matrices
+#define DEF_SHOW_MATRIX true
+//! Default value for using or not city limit for showing solution steps matrices
+#define DEF_USE_SHOW_MATRIX_LIMIT true
+//! Default maximum number of cities to show solution step matrices
+#define DEF_SHOW_MATRIX_CITY_LIMIT 15
 //! Default font name
 #define DEF_FONT_FAMILY "Courier New"
@@ -54,5 +60,5 @@
 
 //! Maximum available number of cities
-#define MAX_NUM_CITIES 30
+#define MAX_NUM_CITIES 50
 //! Maximum allowed value for random generation limits
 #define MAX_RAND_VALUE 1000
Index: src/mainwindow.cpp
===================================================================
--- src/mainwindow.cpp	(revision 140109febbe61154ab1fa1349111d72d891f83bb)
+++ src/mainwindow.cpp	(revision 1fbf016a095b6f072d0f2640e55791f938a8d843)
@@ -47,7 +47,6 @@
 	solutionText->setWordWrapMode(QTextOption::WordWrap);
 #ifdef Q_OS_WINCE
-	// A little hack for toolbar icons to have sane size.
-int s = qMin(QApplication::desktop()->screenGeometry().width(),QApplication::desktop()->screenGeometry().height());
-	toolBar->setIconSize(QSize(s / 10,s / 10));
+	// A little hack for toolbar icons to have a sane size.
+	toolBar->setIconSize(QSize(logicalDpiX() / 4, logicalDpiY() / 4));
 #endif
 #ifndef QT_NO_PRINTER
@@ -129,5 +128,5 @@
 	tabWidget->setCurrentIndex(0);
 	solutionText->clear();
-	enableSolutionActions(false);
+	toggleSolutionActions(false);
 	QApplication::restoreOverrideCursor();
 }
@@ -137,24 +136,20 @@
 	if (!maybeSave())
 		return;
-QFileDialog od(this);
-	od.setAcceptMode(QFileDialog::AcceptOpen);
-	od.setFileMode(QFileDialog::ExistingFile);
+
 QStringList filters(trUtf8("All Supported Formats") + " (*.tspt *.zkt)");
 	filters.append(trUtf8("%1 Task Files").arg("TSPSG") + " (*.tspt)");
 	filters.append(trUtf8("%1 Task Files").arg("ZKomModRd") + " (*.zkt)");
 	filters.append(trUtf8("All Files") + " (*)");
-	od.setNameFilters(filters);
-	if (od.exec() != QDialog::Accepted)
-		return;
-QStringList files = od.selectedFiles();
-	if (files.empty())
-		return;
-	if (!tspmodel->loadTask(files.first()))
-		return;
-	setFileName(files.first());
+
+QString file = QFileDialog::getOpenFileName(this, trUtf8("Task Load"), QString(), filters.join(";;"));
+	if (file.isEmpty() || !QFileInfo(file).isFile())
+		return;
+	if (!tspmodel->loadTask(file))
+		return;
+	setFileName(file);
 	tabWidget->setCurrentIndex(0);
 	setWindowModified(false);
 	solutionText->clear();
-	enableSolutionActions(false);
+	toggleSolutionActions(false);
 }
 
@@ -176,15 +171,23 @@
 {
 static QString selectedFile;
-	if (selectedFile.isEmpty())
-#ifndef QT_NO_PRINTER
-		selectedFile = "solution.pdf";
+	if (selectedFile.isEmpty()) {
+		if (fileName == trUtf8("Untitled") + ".tspt") {
+#ifndef QT_NO_PRINTER
+			selectedFile = "solution.pdf";
 #else
-		selectedFile = "solution.html";
+			selectedFile = "solution.html";
 #endif // QT_NO_PRINTER
-QFileDialog sd(this);
-	sd.setAcceptMode(QFileDialog::AcceptSave);
+		} else {
+#ifndef QT_NO_PRINTER
+			selectedFile = QFileInfo(fileName).canonicalPath() + "/" + QFileInfo(fileName).completeBaseName() + ".pdf";
+#else
+			selectedFile = QFileInfo(fileName).canonicalPath() + "/" + QFileInfo(fileName).completeBaseName() + ".html";
+#endif // QT_NO_PRINTER
+		}
+	}
+
 QStringList filters;
 #ifndef QT_NO_PRINTER
-	filters.append(trUtf8("PDF Files") + "(*.pdf)");
+	filters.append(trUtf8("PDF Files") + " (*.pdf)");
 #endif
 	filters.append(trUtf8("HTML Files") + " (*.html *.htm)");
@@ -193,12 +196,9 @@
 #endif // QT_VERSION >= 0x040500
 	filters.append(trUtf8("All Files") + " (*)");
-	sd.setNameFilters(filters);
-	sd.selectFile(selectedFile);
-	if (sd.exec() != QDialog::Accepted)
-		return;
-QStringList files = sd.selectedFiles();
-	if (files.empty())
-		return;
-	selectedFile = files.first();
+
+QString file = QFileDialog::getSaveFileName(this, QString(), selectedFile, filters.join(";;"));
+	if (file.isEmpty())
+		return;
+	selectedFile = file;
 	QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
 #ifndef QT_NO_PRINTER
@@ -302,14 +302,24 @@
 {
 //! \todo TODO: Normal about window :-)
-QString about = QString::fromUtf8("<b>TSPSG: TSP Solver and Generator</b><br>");
-	about += QString::fromUtf8("&nbsp;&nbsp;&nbsp;&nbsp;Version: <b>"BUILD_VERSION"</b><br>");
-	about += QString::fromUtf8("&nbsp;&nbsp;&nbsp;&nbsp;Copyright: <b>&copy; 2007-%1 Lёppa</b><br>").arg(QDate::currentDate().toString("yyyy"));
-	about += QString::fromUtf8("&nbsp;&nbsp;&nbsp;&nbsp;<b><a href=\"http://tspsg.sourceforge.net/\">http://tspsg.sourceforge.net/</a></b><br>");
-	about += "<br>";
+QString title;
+#ifdef Q_OS_WINCE
+	title += QString::fromUtf8("<b>TSPSG<br>TSP Solver and Generator</b><br>");
+#else
+	title += QString::fromUtf8("<b>TSPSG: TSP Solver and Generator</b><br>");
+#endif // Q_OS_WINCE
+	title += QString::fromUtf8("Version: <b>"BUILD_VERSION"</b><br>");
+	title += QString::fromUtf8("<b>&copy; 2007-%1 Lёppa</b><br>").arg(QDate::currentDate().toString("yyyy"));
+	title += QString::fromUtf8("<b><a href=\"http://tspsg.sourceforge.net/\">http://tspsg.sf.net/</a></b><br>");
+QString about;
 	about += QString::fromUtf8("Target OS: <b>%1</b><br>").arg(OS);
-	about += "Qt library:<br>";
+#ifndef STATIC_BUILD
+	about += "Qt library (shared):<br>";
 	about += QString::fromUtf8("&nbsp;&nbsp;&nbsp;&nbsp;Build time: <b>%1</b><br>").arg(QT_VERSION_STR);
 	about += QString::fromUtf8("&nbsp;&nbsp;&nbsp;&nbsp;Runtime: <b>%1</b><br>").arg(qVersion());
+#else
+	about += QString::fromUtf8("Qt library: <b>%1</b> (static)<br>").arg(QT_VERSION_STR);
+#endif // STATIC_BUILD
 	about += QString::fromUtf8("Built on <b>%1</b> at <b>%2</b><br>").arg(__DATE__).arg(__TIME__);
+	about += "<br>";
 	about += QString::fromUtf8("Id: <b>"VERSIONID"</b><br>");
 	about += QString::fromUtf8("Algorithm: <b>%1</b><br>").arg(CTSPSolver::getVersionId());
@@ -329,15 +339,18 @@
 
 QDialog *dlg = new QDialog(this);
-QLabel *lblIcon = new QLabel(dlg);
+QLabel *lblIcon = new QLabel(dlg),
+	*lblTitle = new QLabel(dlg);
 QTextBrowser *txtAbout = new QTextBrowser(dlg);
-QVBoxLayout *vb1 = new QVBoxLayout(),
-	*vb2 = new QVBoxLayout();
+QVBoxLayout *vb = new QVBoxLayout();
 QHBoxLayout *hb = new QHBoxLayout();
 QDialogButtonBox *bb = new QDialogButtonBox(QDialogButtonBox::Ok, Qt::Horizontal, dlg);
 
-	lblIcon->setPixmap(QPixmap(":/images/tspsg.png").scaledToWidth(64, Qt::SmoothTransformation));
-
-	vb1->addWidget(lblIcon);
-	vb1->addStretch();
+	lblIcon->setPixmap(QPixmap(":/images/tspsg.png").scaledToWidth(logicalDpiX() * 2 / 3, Qt::SmoothTransformation));
+	lblIcon->setAlignment(Qt::AlignTop);
+	lblTitle->setText(title);
+
+	hb->addWidget(lblIcon);
+	hb->addWidget(lblTitle);
+	hb->addStretch();
 
 //	txtAbout->setTextInteractionFlags(txtAbout->textInteractionFlags() ^ Qt::TextEditable);
@@ -347,16 +360,15 @@
 	txtAbout->moveCursor(QTextCursor::Start);
 
-	hb->addLayout(vb1);
-	hb->addWidget(txtAbout);
-
-	vb2->addLayout(hb);
-	vb2->addWidget(bb);
-
+	vb->addLayout(hb);
+	vb->addWidget(txtAbout);
+	vb->addWidget(bb);
+
+	dlg->setWindowFlags(Qt::Dialog | Qt::CustomizeWindowHint | Qt::WindowTitleHint | Qt::WindowCloseButtonHint);
 	dlg->setWindowTitle(trUtf8("About TSPSG"));
-	dlg->setLayout(vb2);
+	dlg->setLayout(vb);
 
 	connect(bb, SIGNAL(accepted()), dlg, SLOT(accept()));
 
-	dlg->resize(475, 350);
+	dlg->resize(410, 300);
 	dlg->exec();
 
@@ -402,5 +414,5 @@
 	output.append("<p>" + trUtf8("Variant #%1").arg(spinVariant->value()) + "</p>");
 	output.append("<p>" + trUtf8("Task:") + "</p>");
-	outputMatrix(matrix,output);
+	outputMatrix(matrix, output);
 	output.append("<hr>");
 	output.append("<p>" + trUtf8("Solution of Variant #%1 task").arg(spinVariant->value()) + "</p>");
@@ -411,5 +423,7 @@
 			if (n != spinCities->value()) {
 				output.append("<p>" + trUtf8("Step #%1").arg(n++) + "</p>");
-				outputMatrix(*step, output);
+				if (settings->value("Output/ShowMatrix", DEF_SHOW_MATRIX).toBool() && settings->value("Output/UseShowMatrixLimit", DEF_USE_SHOW_MATRIX_LIMIT).toBool() && (spinCities->value() <= settings->value("Output/ShowMatrixCitiesLimit", DEF_SHOW_MATRIX_CITY_LIMIT).toInt())) {
+					outputMatrix(*step, output);
+				}
 				output.append("<p>" + trUtf8("Selected candidate for branching: %1.").arg(trUtf8("(%1;%2)").arg(step->candidate.nRow + 1).arg(step->candidate.nCol + 1)) + "</p>");
 				if (!step->alts.empty()) {
@@ -444,4 +458,5 @@
 	}
 	output.append("<p></p>");
+
 	solutionText->setHtml(output.join(""));
 	solutionText->setDocumentTitle(trUtf8("Solution of Variant #%1 task").arg(spinVariant->value()));
@@ -450,5 +465,5 @@
 	solutionText->moveCursor(QTextCursor::End);
 
-	enableSolutionActions();
+	toggleSolutionActions();
 	tabWidget->setCurrentIndex(1);
 	QApplication::restoreOverrideCursor();
@@ -515,17 +530,4 @@
 
 	QMainWindow::closeEvent(ev);
-}
-
-void MainWindow::enableSolutionActions(bool enable)
-{
-	buttonSaveSolution->setEnabled(enable);
-	actionFileSaveAsSolution->setEnabled(enable);
-	solutionText->setEnabled(enable);
-	if (!enable)
-		output.clear();
-#ifndef QT_NO_PRINTER
-	actionFilePrint->setEnabled(enable);
-	actionFilePrintPreview->setEnabled(enable);
-#endif // QT_NO_PRINTER
 }
 
@@ -688,21 +690,17 @@
 
 bool MainWindow::saveTask() {
-QFileDialog sd(this);
-	sd.setAcceptMode(QFileDialog::AcceptSave);
 QStringList filters(trUtf8("%1 Task File").arg("TSPSG") + " (*.tspt)");
 	filters.append(trUtf8("All Files") + " (*)");
-	sd.setNameFilters(filters);
-	sd.setDefaultSuffix("tspt");
-	if (fileName.endsWith(".tspt",Qt::CaseInsensitive))
-		sd.selectFile(fileName);
+QString file;
+	if (fileName.endsWith(".tspt", Qt::CaseInsensitive))
+		file = fileName;
 	else
-		sd.selectFile(QFileInfo(fileName).canonicalPath() + "/" + QFileInfo(fileName).completeBaseName() + ".tspt");
-	if (sd.exec() != QDialog::Accepted)
+		file = QFileInfo(fileName).canonicalPath() + "/" + QFileInfo(fileName).completeBaseName() + ".tspt";
+
+	file = QFileDialog::getSaveFileName(this, trUtf8("Task Save"), file, filters.join(";;"));
+	if (file.isEmpty())
 		return false;
-QStringList files = sd.selectedFiles();
-	if (files.empty())
-		return false;
-	if (tspmodel->saveTask(files.first())) {
-		setFileName(files.first());
+	if (tspmodel->saveTask(file)) {
+		setFileName(file);
 		setWindowModified(false);
 		return true;
@@ -716,2 +714,15 @@
 	setWindowTitle(QString("%1[*] - %2").arg(QFileInfo(fileName).completeBaseName()).arg(trUtf8("Travelling Salesman Problem")));
 }
+
+void MainWindow::toggleSolutionActions(bool enable)
+{
+	buttonSaveSolution->setEnabled(enable);
+	actionFileSaveAsSolution->setEnabled(enable);
+	solutionText->setEnabled(enable);
+	if (!enable)
+		output.clear();
+#ifndef QT_NO_PRINTER
+	actionFilePrint->setEnabled(enable);
+	actionFilePrintPreview->setEnabled(enable);
+#endif // QT_NO_PRINTER
+}
Index: src/mainwindow.h
===================================================================
--- src/mainwindow.h	(revision 140109febbe61154ab1fa1349111d72d891f83bb)
+++ src/mainwindow.h	(revision 1fbf016a095b6f072d0f2640e55791f938a8d843)
@@ -87,5 +87,4 @@
 
 	void closeEvent(QCloseEvent *ev);
-	void enableSolutionActions(bool enable = true);
 	void initDocStyleSheet();
 	void loadLangList();
@@ -96,4 +95,5 @@
 	bool saveTask();
 	void setFileName(const QString &fileName = trUtf8("Untitled") + ".tspt");
+	void toggleSolutionActions(bool enable = true);
 };
 
Index: src/settingsdialog.cpp
===================================================================
--- src/settingsdialog.cpp	(revision 140109febbe61154ab1fa1349111d72d891f83bb)
+++ src/settingsdialog.cpp	(revision 1fbf016a095b6f072d0f2640e55791f938a8d843)
@@ -35,9 +35,23 @@
 	setupUi(this);
 	// Laying out elements
+	layoutCitiesLimit = new QHBoxLayout();
+	layoutCitiesLimit->setMargin(0);
+	layoutCitiesLimit->setSpacing(0);
+	layoutCitiesLimit->addSpacing(10);
+	layoutCitiesLimit->addWidget(cbCitiesLimit);
+	layoutCitiesLimit->addWidget(spinCitiesLimit);
+	layoutCitiesLimit->addStretch();
+
+	buttonBox->button(QDialogButtonBox::Save)->setIcon(QIcon(":/images/icons/button_ok.png"));
+	buttonBox->button(QDialogButtonBox::Save)->setStatusTip(trUtf8("Save new preferences"));
+	buttonBox->button(QDialogButtonBox::Save)->setCursor(QCursor(Qt::PointingHandCursor));
+	buttonBox->button(QDialogButtonBox::Cancel)->setIcon(QIcon(":/images/icons/button_cancel.png"));
+	buttonBox->button(QDialogButtonBox::Cancel)->setStatusTip(trUtf8("Close without saving preferences"));
+	buttonBox->button(QDialogButtonBox::Cancel)->setCursor(QCursor(Qt::PointingHandCursor));
+
 #ifdef Q_OS_WINCE
 	// Layout helper elements
 QVBoxLayout *vbox1, *vbox2;
 QHBoxLayout *hbox1, *hbox2;
-QSpacerItem *spacer;
 
 	labelRandMin->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Preferred);
@@ -48,6 +62,7 @@
 	vbox2->addWidget(groupRandomSettings);
 	vbox2->addWidget(groupOutputSettings);
-	spacer = new QSpacerItem(0,0,QSizePolicy::Minimum,QSizePolicy::Expanding);
-	vbox2->addItem(spacer);
+	vbox2->addStretch();
+	vbox2->addWidget(cbShowMatrix);
+	vbox2->addLayout(layoutCitiesLimit);
 	vbox2->addWidget(cbAutosize);
 
@@ -62,8 +77,6 @@
 	hbox2->setSpacing(6);
 	hbox2->addWidget(buttonHelp);
-	spacer = new QSpacerItem(0,0,QSizePolicy::Expanding);
-	hbox2->addItem(spacer);
-	hbox2->addWidget(buttonOK);
-	hbox2->addWidget(buttonCancel);
+	hbox2->addStretch();
+	hbox2->addWidget(buttonBox);
 
 	// Central layout
@@ -78,5 +91,4 @@
 QVBoxLayout *vbox1, *vbox2, *vbox3;
 QHBoxLayout *hbox1, *hbox2, *hbox3;
-QSpacerItem *spacer;
 
 	cbSaveState = new QCheckBox(bgWhite);
@@ -93,7 +105,8 @@
 	imgIcon->setFrameShape(QFrame::Panel);
 	imgIcon->setLineWidth(0);
-	imgIcon->setPixmap(QPixmap(QString::fromUtf8(":/images/icons/preferences_system.png")));
+	imgIcon->setPixmap(QPixmap(":/images/icons/preferences_system.png"));
 	imgIcon->setStyleSheet("background-color: #0080C0;");
 	imgIcon->setAlignment(Qt::AlignCenter);
+	imgIcon->setMinimumWidth(150);
 
 	labelHint = new QLabel(bgGrey);
@@ -131,16 +144,15 @@
 	hbox2->addWidget(groupRandomSettings);
 	hbox2->addWidget(groupOutputSettings);
-	spacer = new QSpacerItem(0,0,QSizePolicy::Expanding);
-	hbox2->addItem(spacer);
+	hbox2->addStretch();
 
 	// Top right part (with white bg)
 	vbox2 = new QVBoxLayout(bgWhite);
-	spacer = new QSpacerItem(0,0,QSizePolicy::Minimum,QSizePolicy::Expanding);
-	vbox2->addItem(spacer);
+	vbox2->addStretch();
 	vbox2->addLayout(hbox2);
+	vbox2->addWidget(cbShowMatrix);
+	vbox2->addLayout(layoutCitiesLimit);
 	vbox2->addWidget(cbAutosize);
 	vbox2->addWidget(cbSaveState);
-	spacer = new QSpacerItem(0,0,QSizePolicy::Minimum,QSizePolicy::Expanding);
-	vbox2->addItem(spacer);
+	vbox2->addStretch();
 
 	// Bottom part (with grey bg)
@@ -150,6 +162,5 @@
 	hbox3->addWidget(buttonHelp);
 	hbox3->addWidget(labelHint);
-	hbox3->addWidget(buttonOK);
-	hbox3->addWidget(buttonCancel);
+	hbox3->addWidget(buttonBox);
 
 	// Central layout
@@ -161,6 +172,4 @@
 	vbox1->addWidget(bgGrey);
 #endif // Q_OS_WINCE
-	connect(buttonOK,SIGNAL(clicked()),this,SLOT(accept()));
-	connect(buttonCancel,SIGNAL(clicked()),this,SLOT(reject()));
 	connect(spinRandMin,SIGNAL(valueChanged(int)),this,SLOT(spinRandMinValueChanged(int)));
 	connect(buttonFont,SIGNAL(clicked()),this,SLOT(buttonFontClicked()));
@@ -169,6 +178,5 @@
 	setWindowFlags(windowFlags() ^ Qt::WindowContextHelpButtonHint);
 #ifndef Q_OS_WINCE
-	// Setting initial text of dialog hint label to own status tip
-	// text.
+	// Setting initial text of dialog hint label to own status tip text.
 	labelHint->setText(labelHint->statusTip());
 #endif // Q_OS_WINCE
@@ -182,8 +190,18 @@
 	cbSaveState->setChecked(settings->value("SavePos",false).toBool());
 #endif // Q_OS_WINCE
+
 	settings->beginGroup("Output");
+	cbShowMatrix->setChecked(settings->value("ShowMatrix", DEF_SHOW_MATRIX).toBool());
+	cbCitiesLimit->setEnabled(cbShowMatrix->isChecked());
+	cbCitiesLimit->setChecked(settings->value("UseShowMatrixLimit", DEF_USE_SHOW_MATRIX_LIMIT && cbShowMatrix->isChecked()).toBool());
+	spinCitiesLimit->setEnabled(cbShowMatrix->isChecked());
+	spinCitiesLimit->setValue(settings->value("ShowMatrixCitiesLimit", DEF_SHOW_MATRIX_CITY_LIMIT).toInt());
+	spinCitiesLimit->setMaximum(MAX_NUM_CITIES);
+
 	font = settings->value("Font",QFont(DEF_FONT_FAMILY,DEF_FONT_SIZE)).value<QFont>();
 	color = settings->value("Color",DEF_FONT_COLOR).value<QColor>();
 	settings->endGroup();
+
+	adjustSize();
 }
 
@@ -211,14 +229,19 @@
 {
 #ifndef Q_OS_WINCE
-	settings->setValue("SavePos",cbSaveState->isChecked());
-#endif // Q_OS_WINCE
-	settings->setValue("Autosize",cbAutosize->isChecked());
-	settings->setValue("MinCost",spinRandMin->value());
-	settings->setValue("MaxCost",spinRandMax->value());
+	settings->setValue("SavePos", cbSaveState->isChecked());
+#endif // Q_OS_WINCE
+	settings->setValue("Autosize", cbAutosize->isChecked());
+	settings->setValue("MinCost", spinRandMin->value());
+	settings->setValue("MaxCost", spinRandMax->value());
+
 	settings->beginGroup("Output");
+	settings->setValue("ShowMatrix", cbShowMatrix->isChecked());
+	settings->setValue("UseShowMatrixLimit", cbShowMatrix->isChecked() && cbCitiesLimit->isChecked());
+	if (cbCitiesLimit->isChecked())
+		settings->setValue("ShowMatrixCitiesLimit", spinCitiesLimit->value());
 	if (newFont)
-		settings->setValue("Font",font);
+		settings->setValue("Font", font);
 	if (newColor)
-		settings->setValue("Color",color);
+		settings->setValue("Color", color);
 	settings->endGroup();
 	QDialog::accept();
@@ -261,10 +284,4 @@
 			labelHint->setText(labelHint->statusTip());
 		return true;
-	// Making imgIcon square.
-	} else if (ev->type() == QEvent::Show) {
-bool result = QDialog::event(ev);
-		if (result)
-			imgIcon->setMinimumWidth(imgIcon->height());
-		return result;
 	} else
 		return QDialog::event(ev);
Index: src/settingsdialog.h
===================================================================
--- src/settingsdialog.h	(revision 140109febbe61154ab1fa1349111d72d891f83bb)
+++ src/settingsdialog.h	(revision 1fbf016a095b6f072d0f2640e55791f938a8d843)
@@ -51,4 +51,5 @@
 	bool newColor;
 	QSettings *settings;
+	QHBoxLayout *layoutCitiesLimit;
 #ifndef Q_OS_WINCE
 	QCheckBox *cbSaveState;
Index: src/tspsolver.cpp
===================================================================
--- src/tspsolver.cpp	(revision 140109febbe61154ab1fa1349111d72d891f83bb)
+++ src/tspsolver.cpp	(revision 1fbf016a095b6f072d0f2640e55791f938a8d843)
@@ -211,12 +211,17 @@
 void CTSPSolver::cleanup()
 {
+	QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
 	route.clear();
 	mayNotBeOptimal = false;
 	if (root != NULL)
 		deleteNode(root);
+	QApplication::restoreOverrideCursor();
 }
 
 void CTSPSolver::deleteNode(SStep *&node)
 {
+static int x;
+	x++;
+qDebug() << ">>>" << x;
 	if (node->plNode != NULL)
 		deleteNode(node->plNode);
@@ -225,4 +230,6 @@
 	delete node;
 	node = NULL;
+qDebug() << "<<<" << x;
+	x--;
 }
 
