Commit Graph

52 Commits

Author SHA1 Message Date
Marek Roszko e0f28fc4e1 Replace wxFindReplaceData with our own container
By dropping the flags, we can be strict with options.
Also it makes future usage of search functionality a little more "UI" framework independent
2022-08-23 22:16:51 -04:00
Jeff Young 476f1a7d4d Preload PCBnew find with selection when appropriate. 2022-03-19 19:37:01 +00:00
Fabien Corona d452f79860 pcbnew: search for nets
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10601
2022-03-10 23:12:30 +00:00
Jeff Young 60fc75e239 Don't findnext on an empty string; show the dialog.
Fixes https://gitlab.com/kicad/code/kicad/issues/10313
2022-01-18 18:59:40 +00:00
Konstantin Baranovskiy d00810c0fb Pcbnew: make search field focused by default in Find dialog 2021-12-06 19:08:23 +00:00
Seth Hillbrand 29b851dce1 Tighten up ecea2e4279 2021-10-18 13:44:19 -07:00
Mark Hämmerling ecea2e4279 pcbnew: Add window title to "Find" dialog 2021-10-18 20:39:37 +00:00
Jeff Young 6aaf4413b3 Fix kicad_string.h / string.cpp mismatch.
They don't define a KiCad string class, so the header file name was
somewhat misleading. But the fact that they didn't match definitely
made coding more difficult.
2021-07-29 16:03:25 +01:00
Wayne Stambaugh 1a301d8eea Stop using wxDialog::EndModal() from inside dialogs.
Calling wxDialog::EndModal() directly from inside the dialog is a
potential bug if the dialog is shown in the modeless or window modal
(quasi-modal).  Use the internal button events where possible and
check for the appropriate mode before calling the correct end dialog
function.
2021-07-21 17:38:14 -04:00
Jeff Young a1dfc36233 More error message regularization. 2021-06-29 01:08:26 +01:00
Ian McInerney 4f05262705 Cleanup includes in board.h and footprint.h 2021-06-03 20:19:52 +01:00
RigoLigoRLC 493a784b62 Fix Pcbnew search "not found" prompt not displayed
Before this, "Searching..." prompt will not go away if nothing was found
in a search session. A bug I noticed while working on !611. After this
fix, "foo not found" will be displayed when Pcbnew cannot find the
given text.
2021-01-11 13:48:20 +00:00
RigoLigoRLC dd328d230b Make Pcbnew search about zone names, fixes #6951
I put zones in "other text items" category of searching as I thought it
would be the appropriate one.

Fixes https://gitlab.com/kicad/code/kicad/issues/6951
2021-01-11 13:48:20 +00:00
Jeff Young 1ca75c8fda Fix from code review for https://gitlab.com/kicad/code/kicad/-/merge_requests/562.
Fixes https://gitlab.com/kicad/code/kicad/issues/6747
2020-12-16 22:02:19 +00:00
Konstantin Baranovskiy 08730cf952 pcbnew: search hits counting fix
Fixes #6747
2020-12-16 18:02:24 +00:00
Jeff Young 7bd31d5237 Naming conventions. 2020-11-14 18:26:03 +00:00
Jeff Young bdbb68f813 MODULE -> FOOTPRINT. 2020-11-13 16:04:03 +00:00
Jeff Young 52a46341db More module -> footprint. 2020-11-13 15:16:24 +00:00
Jeff Young 84dd5108ba Remove some "class_" prefixes from files. 2020-11-13 15:16:23 +00:00
Jeff Young 37906511f5 Class renaming.
DRAWSEGMENT  -> PCB_SHAPE
EDGE_MODULE  -> FP_SHAPE
TEXTE_PCB    -> PCB_TEXT
TEXTE_MODULE -> FP_TEXT
2020-10-05 11:55:33 +01:00
jean-pierre charras 3144bab36f final cleanup about removing useless include 2020-10-03 16:40:36 +02:00
Seth Hillbrand 9937f52f06 Fix crash when not wrapping search
The iterator at the end of the search is already set the end(), so we
cannot increment it safely
2020-09-24 15:57:49 -07:00
Jeff Young 452171e055 Remove more dead code (mostly includes). 2020-08-31 17:29:44 +01:00
Jeff Young 88635ee5b6 Clean up error messages.
Convert a lot of nags to InfoBar errors/warnings/messages, and some
that never should have been exposed to wxFAIL_MSGs.
2020-08-31 14:19:57 +01:00
Jeff Young 85c2e0d23a Add user-defined severities, exclusions and colors to DRC markers.
Exclusions are currently persisted in the project file.

Fixes https://gitlab.com/kicad/code/kicad/issues/1989
2020-03-04 00:39:28 +00:00
Jeff Young c7ec110fba Only center focused items when they're not visible.
This includes outside the window and behind an occluding dialog.
This keeps the view from jumping around when focusing on nearby
objects.
2020-02-24 23:19:17 +00:00
Ian McInerney 5d46e721e5 pcbnew: Cleanup includes of pcbnew_id.h
* Remove unused IDs from the enum
* Remove the include statements from files that no longer need it
2020-01-03 15:39:05 +00:00
Seth Hillbrand 9b7d4e2742 Recleaning DLIST from pcbnew
This was re-introduced by 5d3e6e3d44

The crash happened b/c we have to manage list containers in each element
and minor adjustments cause the rest of the list to be lost.  This
commit re-implements it using std::iterators and deque

Fixes #2623 | https://gitlab.com/kicad/code/kicad/issues/2623
2019-12-10 09:52:07 -08:00
Jeff Young 342c8941b5 More cleanup of dialog_find-base.fbp 2019-11-30 01:00:16 +00:00
Jeff Young 1e4437c6df Some cleanup for the Pcbnew search changes. 2019-11-29 21:38:18 +00:00
Fabien Corona 7297822423 pcbnew: search options
-Users can now search DRC markers with string filtering
-GUI changes for consistency with Eeschema

Fixes: lp:1845460
* https://bugs.launchpad.net/kicad/+bug/1845460
2019-11-29 17:58:05 +00:00
Fabien Corona 5d3e6e3d44 pcbnew: search options
-Add a "wrap" option->Search results implemented as a nested list.
-Allow to go back with a "Find previous" button
-Remove the marker search option
-Fix a DLIST issue
-Add a result counter ("eg: hit(s): 1/3")
-Search history limited to 10
-Fix the search history order
-User can include or exclude references/values/texts from results

Fixes: lp:1845460
* https://bugs.launchpad.net/kicad/+bug/1845460
2019-11-29 17:55:01 +00:00
Jeff Young 4e40534d21 Update find history in combobox when history item is selected. 2019-07-26 23:50:51 -06:00
Jeff Young 3904d7ccfc Push some search stuff down into EDA_DRAW_FRAME so it can be shared.
Also rewrites the PCBNew Find dialog to make use of the above, including:
1) searching in user-defined footprint fields
2) searching in pcb text
3) a history list in the search popup
4) case sensitive searching
5) word sensitive searching
6) the ability to turn wildcard searching on/off
7) better placement of the result when the dialog obscures part of the
window

Fixes: lp:1838006
* https://bugs.launchpad.net/kicad/+bug/1838006
2019-07-26 17:53:32 -06:00
Jeff Young 8f84c3ec4f Grid rid of GetCanvas/GetGalCanvas distinction now that there's only gal. 2019-06-13 19:58:37 +01:00
Seth Hillbrand d1877d7c1b Moving modules from DLIST to std::deque 2019-06-01 09:53:23 -07:00
Jeff Young c2662b0e11 Retire EDA_DRAW_PANEL and legacy_wx/EDA_DRAW_FRAME. 2019-05-31 21:55:30 +01:00
Seth Hillbrand 218bea9ace pcbnew: Fix crash in find dialog
Tool manager is not exposed to the dialogs, we need to reference it
through the parent frame.

Fixes: lp:1830942
* https://bugs.launchpad.net/kicad/+bug/1830942
2019-05-29 15:05:38 -07:00
Jeff Young 1e9da7f57b Remove CurItem() architecture and legacy routers and drawing code. 2019-05-29 00:26:30 +01:00
Jeff Young fbb807f3bb Move some more menu & toolbar items to modern toolset. 2019-05-16 19:57:06 +01:00
Wayne Stambaugh ed94f2c5e0 Pcbnew: fix minor bug in find dialog.
Repeating find with the same search string would result in a not found
error for absolute search strings.  Don't clear the found item if the
search string did not change from the previous search..

Fix another minor bug where the do not warp mouse pointer option was
always checked when the find dialog was called from one of the gal
canvases.

Fixes lp:1793300

https://bugs.launchpad.net/kicad/+bug/1793300
2018-09-19 12:31:17 -04:00
jean-pierre charras 8552f3fedf fix code after renaming files 2018-01-29 22:00:44 +01:00
jean-pierre charras 6014307d06 Pcbnew, DRC dialog: Fix a few issues:
Gal mode: graphic cross-air cursor moved on items when clicking on & DRC error, like in legacy mode.
Make popup menu shown when right clicking on a DRC error item working.
2018-01-17 15:36:04 +01:00
Simon Richter a9ccf1161b Fix quotes in UI messages
This replaces all single and angle bracket quotes in UI messages with
double quotes, for consistency.

Sorry to all translators.
2017-12-15 07:33:07 -05:00
diogocondeco b54e77e466 Macos SetFocus() and SetSelection moved into OnInitDialog
pcbnew/dialog_find and pcbnew/dialog_pad_properties modified so that SetFocus and SetSelection is handled once the dialog is initiated.
2017-01-23 12:30:59 -05:00
unknown 8fedc57499 Small cleanup: remove a few unnecessary casts, and minor cleaning code. 2015-09-03 09:44:30 +02:00
Maciej Suminski 18c9a62c6e pcbnew: DIALOG_FIND allows to change warp options and set callbacks for found items. 2014-10-13 15:23:30 +02:00
jean-pierre charras f905b4697e Code cleanup: Pcbnew: move files relative to exort functions to the new folder exporters
all: remove include <protos.h>  from a lot of  files which do not need it.
2014-01-08 15:18:51 +01:00
Wayne Stambaugh 42d7bf6c8e Pcbnew encapsulation and code cleaning.
* Encapsulate most of the MODULE class.
* Start encapsulating the DIMENSION class.
* Lay some groundwork for EDA_TEXT encapsulation.
* Move cleverly hidden MODULE functions into class_module.cpp.
* Use std::swap to exchange TEXTE_PCB values for undo/redo.
* Remove unused members from MODULE class.
* The usual coding policy and documentation fixes.
2013-03-13 14:53:58 -04:00
jean-pierre charras 7fd24c7f03 Very minor fixes. 2012-08-03 17:43:15 +02:00