diff --git a/apps/opencs/view/tools/searchsubview.cpp b/apps/opencs/view/tools/searchsubview.cpp index 64827b737..0bdb9d658 100644 --- a/apps/opencs/view/tools/searchsubview.cpp +++ b/apps/opencs/view/tools/searchsubview.cpp @@ -12,7 +12,8 @@ #include "searchbox.hpp" CSVTools::SearchSubView::SearchSubView (const CSMWorld::UniversalId& id, CSMDoc::Document& document) -: CSVDoc::SubView (id), mDocument (document), mPaddingBefore (10), mPaddingAfter (10) +: CSVDoc::SubView (id), mDocument (document), mPaddingBefore (10), mPaddingAfter (10), + mLocked (false) { QVBoxLayout *layout = new QVBoxLayout; @@ -44,7 +45,7 @@ CSVTools::SearchSubView::SearchSubView (const CSMWorld::UniversalId& id, CSMDoc: void CSVTools::SearchSubView::setEditLock (bool locked) { - // ignored. We don't change document state anyway. + mLocked = false; } void CSVTools::SearchSubView::updateUserSetting (const QString &name, const QStringList &list) @@ -76,6 +77,9 @@ void CSVTools::SearchSubView::startSearch (const CSMTools::Search& search) void CSVTools::SearchSubView::replaceRequest() { + if (mLocked) + return; + std::vector indices = mTable->getReplaceIndices (true); std::string replace = mSearchBox.getReplaceText(); diff --git a/apps/opencs/view/tools/searchsubview.hpp b/apps/opencs/view/tools/searchsubview.hpp index 125d0b927..59fbfe66e 100644 --- a/apps/opencs/view/tools/searchsubview.hpp +++ b/apps/opencs/view/tools/searchsubview.hpp @@ -29,6 +29,7 @@ namespace CSVTools int mPaddingBefore; int mPaddingAfter; CSMTools::Search mSearch; + bool mLocked; public: