From 7f0ed057b648abfa936cede8b44f4723ddf576be Mon Sep 17 00:00:00 2001 From: Leonardo Zide Date: Sat, 30 Jan 2021 18:03:35 -0800 Subject: [PATCH] Added find next icon. --- common/lc_findreplacewidget.cpp | 3 ++- common/lc_mainwindow.cpp | 4 ++++ leocad.qrc | 2 ++ resources/edit_find_next.png | Bin 0 -> 114 bytes resources/edit_find_previous.png | Bin 0 -> 112 bytes 5 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 resources/edit_find_next.png create mode 100644 resources/edit_find_previous.png 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 0000000000000000000000000000000000000000..891912f90f0a76ff624ef4d553f64cf11c81cf9d GIT binary patch literal 114 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`oCO|{#S9F5M?jcysy3fAP*BCw z#WBR