mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-27 06:19:36 +00:00
Fix initial focus problem with outline and view-source panes.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25213 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
7f4247e718
commit
42cb86adb9
@ -187,7 +187,10 @@ void Dialog::showView()
|
||||
} else
|
||||
w->show();
|
||||
|
||||
if (wantInitialFocus())
|
||||
w->setFocus();
|
||||
else
|
||||
lyxview_->setFocus();
|
||||
}
|
||||
|
||||
|
||||
|
@ -124,6 +124,11 @@ public:
|
||||
/// Create the dialog if necessary, update it and display it.
|
||||
void showView();
|
||||
|
||||
/// Decide wether the dialog should grab thekeyboard focus when shown.
|
||||
/// This method defaults to true, override if a different behaviour
|
||||
/// is wanted.
|
||||
virtual bool wantInitialFocus() const { return true; }
|
||||
|
||||
/// Update the display of the dialog whilst it is still visible.
|
||||
virtual void updateView() = 0;
|
||||
|
||||
|
@ -48,6 +48,7 @@ public:
|
||||
bool initialiseParams(std::string const & data);
|
||||
void updateView();
|
||||
void enableView(bool enable);
|
||||
bool wantInitialFocus() const { return false; }
|
||||
|
||||
public:
|
||||
/// clean-up on hide.
|
||||
|
@ -77,6 +77,7 @@ public:
|
||||
void enableView(bool enable);
|
||||
void saveSession() const;
|
||||
void restoreSession();
|
||||
bool wantInitialFocus() const { return false; }
|
||||
///@}
|
||||
|
||||
/// The title displayed by the dialog reflects source type.
|
||||
|
Loading…
Reference in New Issue
Block a user