Coverity Scan.

--HG--
branch : develop
This commit is contained in:
dismine 2014-06-17 15:56:14 +03:00
parent 0d0748fcee
commit c4ddcdffe8
2 changed files with 22 additions and 7 deletions

View File

@ -1594,13 +1594,28 @@ void MainWindow::FullParseFile()
ui->actionPattern_properties->setEnabled(true); ui->actionPattern_properties->setEnabled(true);
qint32 index = comboBoxDraws->findText(patternPiece); qint32 index = comboBoxDraws->findText(patternPiece);
if ( index != -1 ) try
{ // -1 for not found
currentDrawChanged(index);
}
else
{ {
currentDrawChanged(0); if ( index != -1 )
{ // -1 for not found
currentDrawChanged(index);
}
else
{
currentDrawChanged(0);
}
}
catch (VExceptionBadId &e)
{
e.CriticalMessageBox(tr("Bad id."), this);
Clear();
return;
}
catch (const VExceptionEmptyParameter &e)
{
e.CriticalMessageBox(tr("Error empty parameter."), this);
Clear();
return;
} }
if (comboBoxDraws->count() > 0) if (comboBoxDraws->count() > 0)

View File

@ -458,7 +458,7 @@ void VToolDetail::contextMenuEvent(QGraphicsSceneContextMenuEvent *event)
} }
if (selectedAction == actionRemove) if (selectedAction == actionRemove)
{ {
DeleteTool(this); DeleteTool();
} }
} }