Get rid of LyXView::hasFocus().

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31452 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2009-09-23 09:17:11 +00:00
parent 6e800efcaf
commit 414571cf68
4 changed files with 1 additions and 10 deletions

View File

@ -65,8 +65,6 @@ public:
/// set a buffer to the current workarea.
virtual void setBuffer(Buffer * b) = 0; ///< \c Buffer to set.
///
virtual bool hasFocus() const = 0;
/// load a document into the current workarea.
virtual Buffer * loadDocument(

View File

@ -808,7 +808,7 @@ LyXView * GuiApplication::currentWindow()
the main window. In this case, we want to disable the menu
entries that are buffer or view-related.
*/
if (current_view_ && !current_view_->hasFocus())
if (current_view_ && current_view_->activeWindow() != this)
return 0;
#endif
return current_view_;

View File

@ -734,12 +734,6 @@ void GuiView::updateStatusBar()
}
bool GuiView::hasFocus() const
{
return qApp->activeWindow() == this;
}
bool GuiView::event(QEvent * e)
{
switch (e->type())

View File

@ -71,7 +71,6 @@ public:
BufferView * documentBufferView();
BufferView const * documentBufferView() const;
void setBuffer(Buffer * b);
bool hasFocus() const;
Buffer * loadDocument(support::FileName const & name,
bool tolastfiles = true);
void newDocument(std::string const & filename,