mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 05:16:21 +00:00
Initialize F&R dialog with selected text (#8448)
This commit is contained in:
parent
21fa3f3f94
commit
c4fbd0d913
@ -91,6 +91,14 @@ GuiSearchWidget::GuiSearchWidget(QWidget * parent)
|
||||
}
|
||||
|
||||
|
||||
bool GuiSearchWidget::initialiseParams(std::string const & str)
|
||||
{
|
||||
if (!str.empty())
|
||||
findCO->lineEdit()->setText(toqstr(str));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
void GuiSearchWidget::keyPressEvent(QKeyEvent * ev)
|
||||
{
|
||||
KeySymbol sym;
|
||||
|
@ -38,6 +38,8 @@ public:
|
||||
///
|
||||
void setBufferView(BufferView const * bv) { bv_ = bv; }
|
||||
///
|
||||
bool initialiseParams(std::string const &);
|
||||
///
|
||||
bool isMinimized() { return minimized_; }
|
||||
|
||||
private Q_SLOTS:
|
||||
@ -85,7 +87,8 @@ public:
|
||||
|
||||
/// Controller inherited method.
|
||||
///@{
|
||||
bool initialiseParams(std::string const &) override { return true; }
|
||||
bool initialiseParams(std::string const & sdata) override
|
||||
{ return widget_->initialiseParams(sdata); }
|
||||
void clearParams() override {}
|
||||
void dispatchParams() override {}
|
||||
bool isBufferDependent() const override { return true; }
|
||||
|
@ -4426,6 +4426,9 @@ void GuiView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
|
||||
sdata = bv->cursor().getEncoding()->name();
|
||||
if (!sdata.empty())
|
||||
showDialog("symbols", sdata);
|
||||
} else if (name == "findreplace") {
|
||||
sdata = to_utf8(bv->cursor().selectionAsString(false));
|
||||
showDialog(name, sdata);
|
||||
// bug 5274
|
||||
} else if (name == "prefs" && isFullScreen()) {
|
||||
lfunUiToggle("fullscreen");
|
||||
|
Loading…
Reference in New Issue
Block a user