Remove redundant check.
--HG-- branch : develop
This commit is contained in:
parent
d10026bd9d
commit
7b76dbe99d
|
@ -436,18 +436,15 @@ bool MApplication::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();
|
TMainWindow *mw = MainWindow();
|
||||||
if(not macFileOpen.isEmpty())
|
if (mw)
|
||||||
{
|
{
|
||||||
TMainWindow *mw = MainWindow();
|
mw->LoadFile(macFileOpen); // open file in existing window
|
||||||
if (mw)
|
|
||||||
{
|
|
||||||
mw->LoadFile(macFileOpen); // open file in existing window
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user