Remove redundant check.
--HG-- branch : develop
This commit is contained in:
parent
ffc1bae39c
commit
4cf9c59056
|
@ -637,18 +637,15 @@ bool VApplication::event(QEvent *e)
|
||||||
case QEvent::FileOpen:
|
case QEvent::FileOpen:
|
||||||
{
|
{
|
||||||
QFileOpenEvent *fileOpenEvent = static_cast<QFileOpenEvent *>(e);
|
QFileOpenEvent *fileOpenEvent = static_cast<QFileOpenEvent *>(e);
|
||||||
if(fileOpenEvent)
|
const QString macFileOpen = fileOpenEvent->file();
|
||||||
|
if(not macFileOpen.isEmpty())
|
||||||
{
|
{
|
||||||
const QString macFileOpen = fileOpenEvent->file();
|
MainWindow *window = qobject_cast<MainWindow*>(mainWindow);
|
||||||
if(not macFileOpen.isEmpty())
|
if (window)
|
||||||
{
|
{
|
||||||
MainWindow *window = qobject_cast<MainWindow*>(mainWindow);
|
window->LoadPattern(macFileOpen); // open file in existing window
|
||||||
if (window)
|
|
||||||
{
|
|
||||||
window->LoadPattern(macFileOpen); // open file in existing window
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user