Remove redundant check.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2016-12-21 17:19:12 +02:00
parent ffc1bae39c
commit 4cf9c59056

View File

@ -637,18 +637,15 @@ bool VApplication::event(QEvent *e)
case QEvent::FileOpen:
{
QFileOpenEvent *fileOpenEvent = static_cast<QFileOpenEvent *>(e);
if(fileOpenEvent)
const QString macFileOpen = fileOpenEvent->file();
if(not macFileOpen.isEmpty())
{
const QString macFileOpen = fileOpenEvent->file();
if(not macFileOpen.isEmpty())
MainWindow *window = qobject_cast<MainWindow*>(mainWindow);
if (window)
{
MainWindow *window = qobject_cast<MainWindow*>(mainWindow);
if (window)
{
window->LoadPattern(macFileOpen); // open file in existing window
}
return true;
window->LoadPattern(macFileOpen); // open file in existing window
}
return true;
}
break;
}