diff --git a/common/lc_findreplacewidget.cpp b/common/lc_findreplacewidget.cpp index 9a228efd..caccbc9d 100644 --- a/common/lc_findreplacewidget.cpp +++ b/common/lc_findreplacewidget.cpp @@ -126,6 +126,8 @@ lcFindReplaceWidget::lcFindReplaceWidget(QWidget* Parent, lcModel* Model, bool R lcSearchOptions& SearchOptions = gMainWindow->mSearchOptions; + SearchOptions.SearchValid = true; + if (!Replace) { SearchOptions.ReplaceColor = false; @@ -134,7 +136,6 @@ lcFindReplaceWidget::lcFindReplaceWidget(QWidget* Parent, lcModel* Model, bool R if (Focus) { - SearchOptions.SearchValid = true; SearchOptions.Info = Focus->mPieceInfo; SearchOptions.ColorIndex = Focus->GetColorIndex(); diff --git a/common/lc_mainwindow.cpp b/common/lc_mainwindow.cpp index 9b59cb44..03879653 100644 --- a/common/lc_mainwindow.cpp +++ b/common/lc_mainwindow.cpp @@ -285,6 +285,8 @@ void lcMainWindow::CreateActions() mActions[LC_EDIT_ACTION_ROLL]->setIcon(QIcon(":/resources/action_roll.png")); mActions[LC_EDIT_ACTION_ZOOM_REGION]->setIcon(QIcon(":/resources/action_zoom_region.png")); mActions[LC_EDIT_FIND]->setIcon(QIcon(":/resources/edit_find.png")); + mActions[LC_EDIT_FIND_NEXT]->setIcon(QIcon(":/resources/edit_find_next.png")); + mActions[LC_EDIT_FIND_PREVIOUS]->setIcon(QIcon(":/resources/edit_find_previous.png")); mActions[LC_PIECE_SHOW_EARLIER]->setIcon(QIcon(":/resources/piece_show_earlier.png")); mActions[LC_PIECE_SHOW_LATER]->setIcon(QIcon(":/resources/piece_show_later.png")); mActions[LC_VIEW_SPLIT_HORIZONTAL]->setIcon(QIcon(":/resources/view_split_horizontal.png")); @@ -2008,6 +2010,8 @@ void lcMainWindow::UpdateSelectedObjects(bool SelectionChanged) mActions[LC_EDIT_FIND]->setEnabled((Flags & LC_SEL_NO_PIECES) == 0); mActions[LC_EDIT_FIND_NEXT]->setEnabled((Flags & LC_SEL_NO_PIECES) == 0); mActions[LC_EDIT_FIND_PREVIOUS]->setEnabled((Flags & LC_SEL_NO_PIECES) == 0); + mActions[LC_EDIT_REPLACE]->setEnabled((Flags & LC_SEL_NO_PIECES) == 0); + mActions[LC_EDIT_REPLACE_NEXT]->setEnabled((Flags & LC_SEL_NO_PIECES) == 0); mActions[LC_EDIT_SELECT_INVERT]->setEnabled((Flags & LC_SEL_NO_PIECES) == 0); mActions[LC_EDIT_SELECT_BY_NAME]->setEnabled((Flags & LC_SEL_NO_PIECES) == 0); mActions[LC_EDIT_SELECT_BY_COLOR]->setEnabled((Flags & LC_SEL_NO_PIECES) == 0); diff --git a/leocad.qrc b/leocad.qrc index a5e03d3c..09b9ed25 100644 --- a/leocad.qrc +++ b/leocad.qrc @@ -63,6 +63,8 @@ resources/edit_copy.png resources/edit_cut.png resources/edit_find.png + resources/edit_find_next.png + resources/edit_find_previous.png resources/edit_paste.png resources/edit_redo.png resources/edit_snap_angle.png diff --git a/resources/edit_find_next.png b/resources/edit_find_next.png new file mode 100644 index 00000000..891912f9 Binary files /dev/null and b/resources/edit_find_next.png differ diff --git a/resources/edit_find_previous.png b/resources/edit_find_previous.png new file mode 100644 index 00000000..e1d270c2 Binary files /dev/null and b/resources/edit_find_previous.png differ