kicad/include
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
..
core made netlist entries and netlist update undoable 2016-01-29 11:21: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 GitHub plugin: fix threading issues when libcurl is build against openssl. 2016-01-14 10:17:13 -05:00
math Clarify atan2 overloads 2016-01-17 10:59:24 -05:00
tool TOOL_SETTINGS acquires wxConfigBase each time it is used. 2015-08-07 18:17:51 +02:00
ttl Removed a redundant field in RN_NODE class. 2015-06-05 17:49:01 +02:00
view Add support for optional touchpad panning. 2016-02-24 14:53:02 -05:00
widgets Dynamically size horizontal column if necessary. 2016-01-15 21:06:51 -05:00
base_struct.h Minot fixes: Minor coding style issues fix (tab -> spaces). Add missing GetClass to all classes derived from EDA_ITEM. Make debug method Show() only compiled in debug mode. 2015-03-06 09:58:32 +01:00
base_units.h Add "move exact" and "duplicate" tools to pcbnew 2015-02-12 03:22:24 +00:00
bezier_curves.h More missing source license fixes. 2014-10-22 11:51:34 -04:00
bin_mod.h Minor coding style fixes in headers 2016-01-12 11:33:33 -05:00
bitmaps.h Pcbnew, File menu: break Open (board) into 2 menu items: Open (only for Kicad board files) and Import (only for non Kicad board files) 2016-03-04 19:48:08 +01:00
block_commande.h Fix Bug #1426675 (Undo and cancel commands don't have effect for Duplicate operation in legacy mode) 2015-03-22 10:42:41 +01:00
build_version.h More missing source license fixes. 2014-10-22 11:51:34 -04:00
class_base_screen.h Fix saving undo/redo limits in Eeschema. 2015-08-05 20:10:52 -04:00
class_bitmap_base.h Minor coding style fixes in headers 2016-01-12 11:33:33 -05:00
class_board_design_settings.h Remove a few coverity warnings. Fix some comments which were incorrect, due to the changes in code. Remove not compiled code (kept as comments), now outdated or useless 2015-03-13 17:48:42 +01:00
class_board_item.h Moved GetLayerSet() to BOARD_ITEM. 2015-06-04 14:54:07 +02:00
class_collector.h Try to fix Bug #1431391 (Unable to edit pins in Schematic library editor). It happens on XFCE, but also on Unity. This fix works on Unity. (it is due to the fact the dialog is not raised, for an unknown reason, and this bug depend on the way Eeschema and Libedit are run). 2015-03-14 12:50:39 +01:00
class_colors_design_settings.h Add missing source file licenses and code policy fixes. 2014-10-19 16:20:16 -04:00
class_draw_panel_gal.h Fixed the problem of GAL frames excessively taking over focus in Windows. 2015-08-25 11:21:00 +02:00
class_drawpanel.h Add support for optional touchpad panning. 2016-02-24 14:53:02 -05:00
class_drc_item.h Fix uninitialized member in DRC_ITEM constructor. 2014-08-16 14:12:11 -04:00
class_eda_rect.h Eeschema: add field automatic placement feature. 2015-12-13 11:56:47 -05:00
class_layer_box_selector.h More missing source license fixes. 2014-10-22 11:51:34 -04:00
class_macros_record.h More missing source license fixes. 2014-10-22 11:51:34 -04:00
class_marker_base.h 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_page_info.h 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_pcb_screen.h More missing source license fixes. 2014-10-22 11:51:34 -04:00
class_title_block.h Minor coding style fixes in headers 2016-01-12 11:33:33 -05:00
class_undoredo_container.h Added const modifiers where applicable (PICKED_ITEMS_LIST). 2013-12-18 13:27:18 +01:00
class_worksheet_dataitem.h More missing source license fixes. 2014-10-22 11:51:34 -04:00
colors.h A bit of cleaning code. 2015-07-08 19:46:24 +02:00
colors_selection.h More missing source license fixes. 2014-10-22 11:51:34 -04:00
common.h Fix Python regression from rev 6496 2016-01-20 19:32:50 -05:00
config_params.h Minor coding style fixes in headers 2016-01-12 11:33:33 -05:00
confirm.h Clean up includes in confirm.cpp, confirm.h 2016-01-18 00:17:56 -05:00
convert_basic_shapes_to_polygon.h 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
convert_from_iu.h 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
convert_to_biu.h 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
dialog_env_var_config.h Many minor fixes (like bug #1477213). Better help in dialog environment variables editor (the tooltip was never shown on Windows) 2015-07-24 12:23:34 +02:00
dialog_get_component.h More missing source license fixes. 2014-10-22 11:51:34 -04:00
dialog_helpers.h Try to fix an issue on Ubuntu/Unity for some dialogs which are not displayed. For most, adding GetSizer()->Fit( this ) in dialog constructor fix the issue, but at least one dialog still is not displayed. 2014-11-19 15:22:47 +01:00
dialog_hotkeys_editor.h Refactor WIDGET_HOTKEY_LIST out of DIALOG_HOTKEYS_EDITOR 2016-01-15 20:56:57 -05:00
dialog_shim.h Minor coding style fixes in headers 2016-01-12 11:33:33 -05:00
dlist.h Refinement to commit #4993. 2014-07-14 16:43:21 +02:00
draw_frame.h Fix typing problems with GR_KB_* constants 2016-01-20 07:11:17 -05:00
drawtxt.h More missing source license fixes. 2014-10-22 11:51:34 -04:00
dsnlexer.h More Coverity scan error fixes. 2015-02-22 16:25:29 -05:00
eda_dde.h More missing source license fixes. 2014-10-22 11:51:34 -04:00
eda_doc.h More missing source license fixes. 2014-10-22 11:51:34 -04:00
eda_pattern_match.h Minor coding style fixes in headers 2016-01-12 11:33:33 -05:00
eda_text.h Pcbnew: simplify draw code in default canvas and plot functions by removing the plot LINE option, which is not existing in all plotters, not existing in opengl/cairo canvas, and not usefull in default canvas. 2015-02-02 09:06:39 +01:00
fctsys.h removed wx carbon include in fctsys as it is unnecessary 2015-12-12 23:03:35 +13:00
filter_reader.h Minor coding style fixes in headers 2016-01-12 11:33:33 -05:00
footprint_info.h CvPcb: count unique pin numbers when filtering by pin count. (fixes:1300719) 2015-11-11 13:35:26 -05:00
fp_lib_table.h More Coverity scan error fix goodness. 2015-02-28 15:50:35 -05:00
fpid.h 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
frame_type.h More missing source license fixes. 2014-10-22 11:51:34 -04:00
gestfich.h Default and most recently used path fixes. (fixes: 1494210) 2015-09-25 15:38:09 -04:00
gr_basic.h All: use solid lines instead of dashed lines to draw X and Y axis in legacy canvas (like in Gal canvas). The main reason: on OSX axis using dashed lines are very very slow to draw (looks like a wxWidget issue when the wxDC scale factor is very small) 2015-10-25 17:58:04 +01:00
grid_tricks.h *) Factor out Cut, Copy, and Paste for wxGrid into class common/GRID_TRICKS. 2013-10-23 13:56:03 -05:00
hashtables.h Minor coding style fixes in headers 2016-01-12 11:33:33 -05:00
hotkeys_basic.h Refactor WIDGET_HOTKEY_LIST out of DIALOG_HOTKEYS_EDITOR 2016-01-15 20:56:57 -05:00
html_messagebox.h More missing source license fixes. 2014-10-22 11:51:34 -04:00
id.h Move copy version information code to about dialog. 2016-03-11 11:40:24 -05:00
import_export.h Use _WIN32 instead of __MINGW32__ in 2 conditional compilations which are Windows specific, not especially mingw32 specific. 2016-03-01 16:55:44 +01:00
ki_mutex.h More missing source license fixes. 2014-10-22 11:51:34 -04:00
kicad_device_context.h Minor coding style fixes in headers 2016-01-12 11:33:33 -05:00
kicad_string.h 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
kiface_i.h Minor coding style fixes in headers 2016-01-12 11:33:33 -05:00
kiway.h Use _WIN32 instead of __MINGW32__ in 2 conditional compilations which are Windows specific, not especially mingw32 specific. 2016-03-01 16:55:44 +01:00
kiway_express.h Minor coding style fixes in headers 2016-01-12 11:33:33 -05:00
kiway_mgr.h Minor coding style fixes in headers 2016-01-12 11:33:33 -05:00
kiway_player.h Minor coding style fixes in headers 2016-01-12 11:33:33 -05:00
layers_id_colors_and_visibility.h Fix enum comparison warnings 2016-01-08 17:28:21 -05:00
length.h.usuned Namespace KiGfx->KIGFX. 2013-10-14 16:13:35 +02:00
macros.h Remove a few conditional compilation for wxWidgets version < 3.0 2015-11-09 13:14:28 +01:00
mail_type.h One-click PCB update improvements 2016-01-29 15:43:40 +01:00
menus_helpers.h CvPcb: serious code cleanup (work in progress): Remove dead or outdated code. Fix a lot of coding style issues. Use better code in many places. No new features. 2016-02-25 10:52:29 +01:00
msgpanel.h More Coverity scan error fix goodness. 2015-02-28 15:50:35 -05:00
newstroke_font.h 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
origin_viewitem.h Add axis origin to the Footprint Editor to align with the Legacy canvas 2015-09-05 20:47:35 +01:00
pad_shapes.h Minor coding style fixes in headers 2016-01-12 11:33:33 -05:00
painter.h Net highlighting mode is toggled when used on the same net (GAL). 2015-09-03 17:56:30 +02:00
pcbcommon.h Default path fixes and remove old to find 3D model path code. 2015-02-27 08:34:02 -05:00
pcbstruct.h Pcbnew: simplify draw code in default canvas and plot functions by removing the plot LINE option, which is not existing in all plotters, not existing in opengl/cairo canvas, and not usefull in default canvas. 2015-02-02 09:06:39 +01:00
pgm_base.h Fix Preferred Editor dialog (lp: 1558353) 2016-03-17 16:59:35 -04:00
plot_common.h 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
profile.h Remove superflous includes. 2015-07-31 09:50:47 -04:00
project.h Minor coding style fixes in headers 2016-01-12 11:33:33 -05:00
ptree.h Minor coding style fixes in headers 2016-01-12 11:33:33 -05:00
reporter.h Minor coding style fixes in headers 2016-01-12 11:33:33 -05:00
richio.h Minor coding style fixes in headers 2016-01-12 11:33:33 -05:00
search_stack.h Fix windows help path bug. (fixes lp:1313412) 2015-09-20 14:23:17 -04:00
trigo.h Minor coding style fixes in headers 2016-01-12 11:33:33 -05:00
utf8.h Minor coding style fixes in headers 2016-01-12 11:33:33 -05:00
validators.h Envrionment variable dialog improvments. 2015-08-16 20:30:29 -04:00
wildcards_and_files_ext.h KiCad: add html file support to tree view. 2015-06-24 15:30:35 -04:00
worksheet.h Minor coding style fixes in headers 2016-01-12 11:33:33 -05:00
worksheet_shape_builder.h Page layout selection: fix Bug #1405972, and add minor enhancement in page layout selection dialog (the new layout is shown after selection). 2014-12-31 13:31:19 +01:00
worksheet_viewitem.h Minot fixes: Minor coding style issues fix (tab -> spaces). Add missing GetClass to all classes derived from EDA_ITEM. Make debug method Show() only compiled in debug mode. 2015-03-06 09:58:32 +01:00
wxBasePcbFrame.h Remove redundant forward declarations. 2016-01-20 15:22:58 +01:00
wxPcbStruct.h One-click PCB update improvements 2016-01-29 15:43:40 +01:00
wx_status_popup.h Code formatting. 2015-02-18 17:53:46 +01:00
wx_unit_binder.h Method to check WX_UNIT_BINDER value validity. 2015-07-09 13:35:50 +02:00
wxstruct.h Move copy version information code to about dialog. 2016-03-11 11:40:24 -05:00
wxunittext.h Fix many doxygen warnings (due to missing info, old comments, typo ...) when building the doxygen doc. 2014-11-02 17:25:04 +01:00
xnode.h Minor coding style fixes in headers 2016-01-12 11:33:33 -05:00