Fixed memory leaks

--HG--
branch : develop
This commit is contained in:
Valentina Zhuravska 2015-09-16 19:37:33 +03:00
parent 17d2df653d
commit 6bba2e435b

View File

@ -1184,6 +1184,22 @@ void MainWindow::SyncMeasurements()
void MainWindow::ToolBarOption()
{
ui->toolBarOption->clear();
if (mouseCoordinate != nullptr)
{
delete mouseCoordinate;
mouseCoordinate = nullptr;
}
if (gradationHeights != nullptr)
{
delete gradationHeights;
gradationHeights = nullptr;
}
if (gradationSizes != nullptr)
{
delete gradationSizes;
gradationSizes = nullptr;
}
if (qApp->patternType() == MeasurementsType::Standard)
{
const QStringList listHeights = VMeasurement::ListHeights(doc->GetGradationHeights(), qApp->patternUnit());