mirror of https://github.com/vitalif/openscad
Editor: Restore lost 'use selection for find' functionality
parent
2e1f24b4dc
commit
8d3d2fe9f4
|
@ -143,6 +143,7 @@ private slots:
|
|||
void findAndReplace();
|
||||
void findNext();
|
||||
void findPrev();
|
||||
void useSelectionForFind();
|
||||
void replace();
|
||||
void replaceAll();
|
||||
protected:
|
||||
|
|
|
@ -319,6 +319,7 @@ MainWindow::MainWindow(const QString &filename)
|
|||
connect(this->editActionFindAndReplace, SIGNAL(triggered()), this, SLOT(findAndReplace()));
|
||||
connect(this->editActionFindNext, SIGNAL(triggered()), this, SLOT(findNext()));
|
||||
connect(this->editActionFindPrevious, SIGNAL(triggered()), this, SLOT(findPrev()));
|
||||
connect(this->editActionUseSelectionForFind, SIGNAL(triggered()), this, SLOT(useSelectionForFind()));
|
||||
|
||||
// Design menu
|
||||
connect(this->designActionAutoReload, SIGNAL(toggled(bool)), this, SLOT(autoReloadSet(bool)));
|
||||
|
@ -1282,6 +1283,11 @@ void MainWindow::findPrev()
|
|||
editor->find(this->findInputField->text(), true, true);
|
||||
}
|
||||
|
||||
void MainWindow::useSelectionForFind()
|
||||
{
|
||||
findInputField->setText(editor->selectedText());
|
||||
}
|
||||
|
||||
bool MainWindow::eventFilter(QObject* obj, QEvent *event)
|
||||
{
|
||||
if (obj == find_panel)
|
||||
|
|
Loading…
Reference in New Issue