kicad/common
dwilches 1c19699a7c Fix Preferred Editor dialog (lp: 1558353)
The functions involved in the problem were PGM_BASE::GetEditorName and
EDA_BASE_FRAME::OnSelectPreferredEditor:

1) OnSelectPreferredEditor showed a dialog to allow the user selecting the
editor, but before that called GetEditorName to get the name of the current
editor (to show as a default in the choose file dialog).

2) The problem was when there was no editor, GetEditorName showed its own
dialog.

3) So the user was seeing first the dialog from (2) and then the dialog from
(1).

4) As GetEditorName is used in many other places the solution I did was to add
to it an optional parameter that tells it what to do if no editor is set. To
avoid modifying other code that relies on the current behaviour, this parameter
has a default value that causes to show the dialog. But now when
OnSelectPreferredEditor calls it, it passes the parameter that causes it to
return an empty string if no editor was set.

5) Also, I found a second bug while doing it which allowed in the first dialog
to select an unexistent file (the dialog was missing the wxFD_FILE_MUST_EXIST
flag).

6) Lastly, to avoid having duplicated code (the one that showed the same dialog
and that configured the wildcard was in two methods) I created a single
function that now both functions call: PGM_BASE::AskUserForPreferredEditor.
This way we also will have consistency in the behaviour of both dialogs and
there is a single place where it needs to be modified.
2016-03-17 16:59:35 -04:00
..
dialog_about Move copy version information code to about dialog. 2016-03-11 11:40:24 -05:00
dialogs Fix Bug #1536427 ("User (Custom)" size selection in"Page Settings" issue in non English languages). 2016-01-21 11:15:13 +01:00
gal Fix incorrect (too small) bounding box EDA_TEXT, noticeable when chars like j or { are used in zone fill functions. 2016-03-11 13:08:34 +01:00
geometry more accurate pushout force calculation for circle-segment collisions 2016-03-01 14:26:08 +01:00
kicad_curl Move copy version information code to about dialog. 2016-03-11 11:40:24 -05:00
math Remove superflous includes. 2015-07-31 09:50:47 -04:00
page_layout Fix Bug #1512726 (pl_editor can't not load template that have image with (option page1only) ) 2015-11-03 17:03:44 +01:00
tool OSX: add support for wxMagnifyEvent on OSX builds using wxWidgets 3.1.0 or greater. 2016-01-24 19:18:29 -05:00
view Add support for optional touchpad panning. 2016-02-24 14:53:02 -05:00
widgets Common: delete accidental dead branch (Coverity) 2016-03-05 23:13:25 -05:00
CMakeLists.txt Refactor WIDGET_HOTKEY_LIST out of DIALOG_HOTKEYS_EDITOR 2016-01-15 20:56:57 -05:00
base_screen.cpp Make undo/redo limits user configurable. 2015-08-05 10:28:27 -04:00
base_struct.cpp Corrected TEXTE_MODULE:GetBoundingBox() function. 2015-08-07 18:17:51 +02:00
base_units.cpp Add "move exact" and "duplicate" tools to pcbnew 2015-02-12 03:22:24 +00:00
basicframe.cpp Fix Preferred Editor dialog (lp: 1558353) 2016-03-17 16:59:35 -04:00
bezier_curves.cpp Add missing source file licenses and code policy fixes. 2014-10-19 16:20:16 -04:00
bin_mod.cpp Remove old, empty header 2016-01-12 10:35:27 -05:00
bitmap.cpp Remove old xpm icons files 2012-04-07 13:09:57 +02:00
block_commande.cpp Fic bug #1475891 (Assertion failed when appending a board in pcbnew) 2015-07-19 11:18:07 +02:00
build_version.cpp Rename the automatically generated version.h to kicad_build_version.h as a workaround to an issue in msys2: for a very obscure reason, version.h was added as dependency to most of .cpp files. 2015-11-24 11:05:34 +01:00
class_bitmap_base.cpp Remove incorrect comment regarding wxWidgets bug report from class_bitmap_base.cpp. 2016-02-23 19:31:34 -05:00
class_colors_design_settings.cpp Add missing source file licenses and code policy fixes. 2014-10-19 16:20:16 -04:00
class_layer_box_selector.cpp Move the non shared file class_sch_screen.h to eeschema folder. Code cleaning. Remove some wxCHECK_VERSION tests now useless. 2015-07-29 20:06:45 +02:00
class_marker_base.cpp Plot solder mask layer: fix incorrect margin of zones drawn on this layer (zone areas were slighly larger than the actual areas) 2015-08-01 12:20:23 +02:00
class_page_info.cpp Fix Bug #1536427 ("User (Custom)" size selection in"Page Settings" issue in non English languages). 2016-01-21 11:15:13 +01:00
class_plotter.cpp Cleanup: remove unnecessary macros EXCHG and NEGATE. add MIRROR macro. 2015-06-26 15:41:56 +02:00
class_undoredo_container.cpp Fixed failing undo while routing. 2015-08-04 23:08:13 +02:00
colors.cpp Add missing source file licenses and code policy fixes. 2014-10-19 16:20:16 -04:00
common.cpp Move the non shared file class_sch_screen.h to eeschema folder. Code cleaning. Remove some wxCHECK_VERSION tests now useless. 2015-07-29 20:06:45 +02:00
common_plotDXF_functions.cpp Prepare rounded rect and custom shaped pads: add plot functions. It fixes also a pcbnew crash in HPGL mode when plotting trapezoidal pads. 2016-02-10 17:02:40 +01:00
common_plotGERBER_functions.cpp Prepare rounded rect and custom shaped pads: add plot functions. It fixes also a pcbnew crash in HPGL mode when plotting trapezoidal pads. 2016-02-10 17:02:40 +01:00
common_plotHPGL_functions.cpp HPGL plot dialog: remove no more in use Pen Overlap parameter. Fix incorrect polygon fill by setting the hpgl pen thickness in hpgl file. Add filled circle (previously, a circle was never filled) 2016-02-11 13:14:46 +01:00
common_plotPDF_functions.cpp Cleanup: remove unnecessary macros EXCHG and NEGATE. add MIRROR macro. 2015-06-26 15:41:56 +02:00
common_plotPS_functions.cpp Prepare rounded rect and custom shaped pads: add plot functions. It fixes also a pcbnew crash in HPGL mode when plotting trapezoidal pads. 2016-02-10 17:02:40 +01:00
common_plotSVG_functions.cpp Fix 2 minor issues in SVG plots: sometimes a color was not good. Rectangles with 0 vertiacl or horizontal size are not plot. 2015-07-13 20:36:06 +02:00
common_plot_functions.cpp Plot PS and PDF: fix bug Bug #1457215 (rect/trap pads plotted with an incorrect pen size, and therefore an incorrect size and shape. Only noticeable with a large default pen size) 2015-05-21 11:04:47 +02:00
config_params.cpp Cvpcb: fix issues relatives to .equ files management: 2015-01-11 18:22:45 +01:00
confirm.cpp Clean up includes in confirm.cpp, confirm.h 2016-01-18 00:17:56 -05:00
convert_basic_shapes_to_polygon.cpp Prepare rounded rect and custom shaped pads: add plot functions. It fixes also a pcbnew crash in HPGL mode when plotting trapezoidal pads. 2016-02-10 17:02:40 +01:00
copy_to_clipboard.cpp Enable plot in clipboard on Linux and OSX in eeschema, and copy in clipboard in 3d viewer ( was existing on Windows, but disabled on other OS ). 2015-05-31 13:51:50 +02:00
dialog_shim.cpp Remove a few conditional compilation for wxWidgets version < 3.0 2015-11-09 13:14:28 +01:00
displlst.cpp Replace dangerous cast of pointer->long 2016-01-16 22:56:58 -05:00
dlist.cpp Hide m_galCanvas and m_galCanvasActive behind accessors. Fix DLIST concatonation API corner case. 2013-12-26 16:36:43 -06:00
draw_frame.cpp Add support for optional touchpad panning. 2016-02-24 14:53:02 -05:00
draw_panel.cpp Fix touchpad scrolling on OSX. 2016-03-01 15:19:00 -05:00
draw_panel_gal.cpp Disable FPS limiter for OSX (GAL). 2016-02-16 09:05:41 +01:00
drawtxt.cpp Fix incorrect (too small) bounding box EDA_TEXT, noticeable when chars like j or { are used in zone fill functions. 2016-03-11 13:08:34 +01:00
dsnlexer.cpp coverity common folder fixes (mainly not initialized members). 2015-03-11 17:04:20 +01:00
eda_dde.cpp Add missing source file licenses and code policy fixes. 2014-10-19 16:20:16 -04:00
eda_doc.cpp 2 very minor fixes in Eeschema: 2015-11-14 09:20:17 +01:00
eda_pattern_match.cpp Eeschema: add wildcard and regular expression search to componet select dialog. 2015-12-20 15:52:39 -05:00
eda_text.cpp Fix incorrect (too small) bounding box EDA_TEXT, noticeable when chars like j or { are used in zone fill functions. 2016-03-11 13:08:34 +01:00
filter_reader.cpp Add Pcbnew GEDA PCB module plugin support. 2012-12-28 15:52:12 -05:00
findkicadhelppath.cpp.notused improve help file finding after kiway breakage. 2014-04-14 13:49:52 -05:00
footprint_info.cpp GitHub plugin: fix potential multiple initialization of libcurl bug. 2016-01-10 16:44:37 -05:00
fp_lib_table.cpp More Coverity scan error fix goodness. 2015-02-28 15:50:35 -05:00
fp_lib_table.keywords more fp_lib_table work, enhance parser 2012-12-08 17:58:03 -06:00
fpid.cpp Pcbnew: Fpid parser: Fix crash when reading a .kicad_pcb file containing a valid fpid with a revision value. 2015-08-23 14:35:49 +02:00
gestfich.cpp Removed the space in the error message after the new line 2016-01-05 06:12:37 +13:00
getrunningmicrosecs.cpp Speed up DSNLEXER::findToken() to such an extent that it resulted in an approximate 13% reduction 2013-06-30 20:05:40 -05:00
gr_basic.cpp OSX: legacy canvas rendering speed improvements. 2016-01-04 15:13:10 -05:00
grid_tricks.cpp Fix 2 coverity warnings, and cleanup a old code in dialog_color_config. 2015-03-04 20:45:18 +01:00
hotkeys_basic.cpp Default and most recently used path fixes. (fixes: 1494210) 2015-09-25 15:38:09 -04:00
html_messagebox.cpp Fix incorrect close function in HTML_MESSAGE_BOX (whichcan be shown in modal or not modal mode) 2015-03-20 20:11:11 +01:00
kiface_i.cpp OSX build improvements. 2014-10-02 19:03:52 -04:00
kiway.cpp Fix a link issue on some platforms, created by rev 6429 2016-01-06 12:08:43 +01:00
kiway_express.cpp Teach cvpcb about new KIWAY based cross-probing, factor out MAIL_T into mail_type.h 2014-04-22 10:16:19 -05:00
kiway_holder.cpp Enable GITHUB as default, include typeinfo into kiway_holder.cpp 2014-03-21 07:20:54 -05:00
kiway_player.cpp Fix Bug #1527446 (Flipping a block in pcbnew doesn't flip inner layers nor their connected microvias). 2015-12-27 16:51:13 +01:00
lockfile.cpp Use XDG_CONFIG_DIR for lock file path on Linux. 2015-01-07 10:04:57 -05:00
lset.cpp Fix Bug #1527446 (Flipping a block in pcbnew doesn't flip inner layers nor their connected microvias). 2015-12-27 16:51:13 +01:00
msgpanel.cpp Fix some issues related to the footprint wizard frame: 2015-09-07 12:52:16 +02:00
netlist.keywords Fix Bug #1381287 (CvPCB ignores the footprint filter field on aliased components) 2015-01-02 08:52:29 +01:00
newstroke_font.cpp all: new Russian GOST patch - author Konstantin Baranovskiy 2013-03-28 00:38:20 +04:00
origin_viewitem.cpp Add axis origin to the Footprint Editor to align with the Legacy canvas 2015-09-05 20:47:35 +01:00
painter.cpp Fixed a few memory leaks and Valgrind warnings. 2014-07-09 15:02:56 +02:00
pcb.keywords Fix but reading empty footprints in netlist. (fixes lp:1226283) 2013-09-16 20:52:08 -04:00
pcb_plot_params.keywords Pcbnew: Rework on Gerber ouput: allows choice between format 4.5 and 4.6. Fix a minor issue in Gerber layers attributes. 2014-07-04 16:22:38 +02:00
pcbcommon.cpp Default path fixes and remove old to find 3D model path code. 2015-02-27 08:34:02 -05:00
pgm_base.cpp Fix Preferred Editor dialog (lp: 1558353) 2016-03-17 16:59:35 -04:00
prependpath.cpp Fix some issues related to the footprint wizard frame: 2015-09-07 12:52:16 +02:00
project.cpp Common: fix subtle project path bug when loading sym-linked project files. 2015-11-02 14:04:53 -05:00
ptree.cpp Eeschema: extend max number of units per package to 52 and clean code to easily extend this value upto 26x26 (but 52 is a reasonable max value). 2015-04-07 13:52:29 +02:00
reporter.cpp Added lazy rendering mode for HTML reporter widget (allows a faster report creation, when the report has many lines) 2015-07-24 17:47:48 +02:00
richio.cpp Add missing header to richio 2016-01-11 21:41:33 -05:00
search_stack.cpp Fix windows help path bug. (fixes lp:1313412) 2015-09-20 14:23:17 -04:00
searchhelpfilefullpath.cpp Fix windows help path bug. (fixes lp:1313412) 2015-09-20 14:23:17 -04:00
selcolor.cpp Move the non shared file class_sch_screen.h to eeschema folder. Code cleaning. Remove some wxCHECK_VERSION tests now useless. 2015-07-29 20:06:45 +02:00
single_top.cpp Disable proxy menu in Unity window manager. Only usual menubar works with wxWidgets (at least <= 3.1). When the proxy menu menubar is enable, some important things for us do not work: menuitems UI events and shortcuts. Also issues when switching from Legacy to GAL display mode. 2015-09-14 09:58:31 +02:00
string.cpp Pcbnew: Fpid parser: Fix crash when reading a .kicad_pcb file containing a valid fpid with a revision value. 2015-08-23 14:35:49 +02:00
strtok_r.c Add strtok_r.c 2013-12-10 17:52:51 -06:00
systemdirsappend.cpp Minor fixes: remove a few useless includes and move a few others to the right file. Remove a few coverity warnings about not initialized members. 2015-05-15 14:49:11 +02:00
trigo.cpp Clarify atan2 overloads 2016-01-17 10:59:24 -05:00
utf8.cpp Initial KIWAY (modular-kicad) work. Various tweeks. 2014-02-03 09:10:37 -06:00
validators.cpp Envrionment variable dialog improvments. 2015-08-16 20:30:29 -04:00
wildcards_and_files_ext.cpp KiCad: add html file support to tree view. 2015-06-24 15:30:35 -04:00
worksheet.cpp Fixed printing issues under Linux. 2015-03-25 10:55:00 +01:00
worksheet_viewitem.cpp Pcbnew: minor changes: 2016-02-09 09:23:24 +01:00
wx_status_popup.cpp Code formatting. 2015-02-18 17:53:46 +01:00
wx_unit_binder.cpp Fix some issues related to the footprint wizard frame: 2015-09-07 12:52:16 +02:00
wxunittext.cpp Fix some issues related to the footprint wizard frame: 2015-09-07 12:52:16 +02:00
wxwineda.cpp * KIWAY Milestone A): Make major modules into DLL/DSOs. 2014-03-19 19:42:08 -05:00
xnode.cpp Make KiCad compile with minimal warnings against SVN HEAD of wxWidgets as of today. 2014-01-07 19:34:04 -06:00
zoom.cpp Allows switching GAL or legacy mode in footprint editor (previously, the mode was inherited from the board editor, and was not modifiable without closing the footprint editor) by menu or F9, F11 and F12 keys) 2015-05-19 18:39:05 +02:00