mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
FindAndReplace: more simplification.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27669 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
b718b83074
commit
6f305f211d
@ -44,11 +44,10 @@ namespace lyx {
|
||||
namespace frontend {
|
||||
|
||||
FindAndReplace::FindAndReplace(GuiView & parent)
|
||||
: DockView(parent, "Find LyX", "Find LyX Dialog", Qt::RightDockWidgetArea),
|
||||
parent_view_(parent)
|
||||
: DockView(parent, "Find LyX", "Find LyX Dialog", Qt::RightDockWidgetArea)
|
||||
{
|
||||
setupUi(this);
|
||||
find_work_area_->setGuiView(parent_view_);
|
||||
find_work_area_->setGuiView(parent);
|
||||
find_work_area_->init();
|
||||
setFocusProxy(find_work_area_);
|
||||
}
|
||||
@ -144,13 +143,16 @@ bool FindAndReplace::initialiseParams(std::string const &)
|
||||
|
||||
void FindAndReplace::find(bool backwards)
|
||||
{
|
||||
parent_view_.setCurrentWorkArea(parent_view_.currentMainWorkArea());
|
||||
// FIXME: create a Dialog::returnFocus() or something instead of this:
|
||||
GuiView & gv = const_cast<GuiView &>(lyxview());
|
||||
gv.setCurrentWorkArea(gv.currentMainWorkArea());
|
||||
// FIXME: This should be an LFUN.
|
||||
findAdv(caseCB->isChecked(),
|
||||
wordsCB->isChecked(),
|
||||
backwards,
|
||||
expandMacrosCB->isChecked(),
|
||||
ignoreFormatCB->isChecked());
|
||||
parent_view_.currentMainWorkArea()->redraw();
|
||||
gv.currentMainWorkArea()->redraw();
|
||||
find_work_area_->setFocus();
|
||||
}
|
||||
|
||||
@ -174,9 +176,7 @@ void FindAndReplace::on_regexpInsertCombo_currentIndexChanged(int index)
|
||||
|
||||
void FindAndReplace::on_closePB_clicked()
|
||||
{
|
||||
find_work_area_->disable();
|
||||
LYXERR(Debug::DEBUG, "Dispatching dialog-hide findreplaceadv" << std::endl);
|
||||
parent_view_.dispatch(FuncRequest(LFUN_DIALOG_TOGGLE, "findreplaceadv"));
|
||||
dispatch(FuncRequest(LFUN_DIALOG_TOGGLE, "findreplaceadv"));
|
||||
}
|
||||
|
||||
|
||||
|
@ -65,10 +65,6 @@ private:
|
||||
bool matchword, bool backwards,
|
||||
bool expandmacros, bool ignoreformat);
|
||||
|
||||
GuiView & parent_view_;
|
||||
|
||||
GuiWorkArea * searchWorkArea_; // The work area defining what to search
|
||||
|
||||
private:
|
||||
/// Apply changes
|
||||
virtual void apply() {}
|
||||
|
Loading…
Reference in New Issue
Block a user