]> git.lyx.org Git - features.git/commit
Fix ToC action when cursor is in adv. F&R pane
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Tue, 28 Jun 2022 21:17:05 +0000 (23:17 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Wed, 29 Jun 2022 09:09:14 +0000 (11:09 +0200)
commitae528715d336562a3d1e65fdd144797caeae25e9
treecd90a6ebea157b1a3acfc2e77a0985036d41e828
parent2283440e77f6b05e4dce45ae00aa81570fc40c25
Fix ToC action when cursor is in adv. F&R pane

This important part is the last point, the rest is what is needed to
make it happen.

* implement (FindAndReplace|FindAndReplaceWidget)::hasWorkArea, that
  tell whether a work area is own by the advanced find & replace
  widget.

* factor out method find() from GuiView::findOrBuild.

* implement GuiView::hasVisibleWorkArea, that tells whether a workarea
  is visible in the view (current tab in a split or adv. f&r
  workarea).

* Finally, in TocWidget::sendDispatch, change the current workarea
  temporarily to the document workarea before dispatching the
  function. The code tries to be as careful as possible to handle all
  cases. The future will tell whether it is good enough.
src/frontends/qt/FindAndReplace.cpp
src/frontends/qt/FindAndReplace.h
src/frontends/qt/GuiView.cpp
src/frontends/qt/GuiView.h
src/frontends/qt/TocWidget.cpp