mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-03 08:28:25 +00:00
Remove bug work around due to bad event loop startup process in 1.5.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25071 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
2003a50e14
commit
b5f4c93599
11
src/LyX.cpp
11
src/LyX.cpp
@ -524,17 +524,6 @@ int LyX::init(int & argc, char * argv[])
|
||||
}
|
||||
|
||||
|
||||
void LyX::addFileToLoad(string const & fname)
|
||||
{
|
||||
vector<string>::const_iterator cit = find(
|
||||
pimpl_->files_to_load_.begin(), pimpl_->files_to_load_.end(),
|
||||
fname);
|
||||
|
||||
if (cit == pimpl_->files_to_load_.end())
|
||||
pimpl_->files_to_load_.push_back(fname);
|
||||
}
|
||||
|
||||
|
||||
bool LyX::loadFiles()
|
||||
{
|
||||
LASSERT(!use_gui, /**/);
|
||||
|
@ -99,9 +99,6 @@ public:
|
||||
/// Execute batch commands if available.
|
||||
void execBatchCommands();
|
||||
|
||||
///
|
||||
void addFileToLoad(std::string const &);
|
||||
|
||||
private:
|
||||
/// noncopyable
|
||||
LyX(LyX const &);
|
||||
|
@ -865,17 +865,8 @@ bool GuiApplication::event(QEvent * e)
|
||||
case QEvent::FileOpen: {
|
||||
// Open a file; this happens only on Mac OS X for now
|
||||
QFileOpenEvent * foe = static_cast<QFileOpenEvent *>(e);
|
||||
|
||||
if (!current_view_ || !current_view_->view())
|
||||
// The application is not properly initialized yet.
|
||||
// So we acknowledge the event and delay the file opening
|
||||
// until LyX is ready.
|
||||
// FIXME UNICODE: FileName accept an utf8 encoded string.
|
||||
LyX::ref().addFileToLoad(fromqstr(foe->file()));
|
||||
else
|
||||
lyx::dispatch(FuncRequest(LFUN_FILE_OPEN,
|
||||
qstring_to_ucs4(foe->file())));
|
||||
|
||||
e->accept();
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user