mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-22 16:37:28 +00:00
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:
parent
6e800efcaf
commit
414571cf68
@ -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(
|
||||
|
@ -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_;
|
||||
|
@ -734,12 +734,6 @@ void GuiView::updateStatusBar()
|
||||
}
|
||||
|
||||
|
||||
bool GuiView::hasFocus() const
|
||||
{
|
||||
return qApp->activeWindow() == this;
|
||||
}
|
||||
|
||||
|
||||
bool GuiView::event(QEvent * e)
|
||||
{
|
||||
switch (e->type())
|
||||
|
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user