Add doc link to custom rules syntax help.
Fixes https://gitlab.com/kicad/code/kicad/issues/13727
This commit is contained in:
parent
4665823089
commit
837ba323fb
|
@ -25,8 +25,10 @@
|
||||||
#include <wx/clipbrd.h>
|
#include <wx/clipbrd.h>
|
||||||
#include <wx/log.h>
|
#include <wx/log.h>
|
||||||
#include <wx/textctrl.h>
|
#include <wx/textctrl.h>
|
||||||
|
#include <wx/uri.h>
|
||||||
#include <string_utils.h>
|
#include <string_utils.h>
|
||||||
#include <dialogs/html_message_box.h>
|
#include <dialogs/html_message_box.h>
|
||||||
|
#include <build_version.h>
|
||||||
|
|
||||||
|
|
||||||
HTML_MESSAGE_BOX::HTML_MESSAGE_BOX( wxWindow* aParent, const wxString& aTitle,
|
HTML_MESSAGE_BOX::HTML_MESSAGE_BOX( wxWindow* aParent, const wxString& aTitle,
|
||||||
|
@ -144,6 +146,20 @@ void HTML_MESSAGE_BOX::ShowModeless()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void HTML_MESSAGE_BOX::OnHTMLLinkClicked( wxHtmlLinkEvent& event )
|
||||||
|
{
|
||||||
|
wxString href = event.GetLinkInfo().GetHref();
|
||||||
|
|
||||||
|
if( href.StartsWith( wxS( "https://docs.kicad.org/" ) ) )
|
||||||
|
{
|
||||||
|
href.Replace( wxS( "GetMajorMinorVersion" ), GetMajorMinorVersion() );
|
||||||
|
|
||||||
|
wxURI uri( href );
|
||||||
|
wxLaunchDefaultBrowser( uri.BuildURI() );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void HTML_MESSAGE_BOX::OnCharHook( wxKeyEvent& aEvent )
|
void HTML_MESSAGE_BOX::OnCharHook( wxKeyEvent& aEvent )
|
||||||
{
|
{
|
||||||
// shift-return (Mac default) or Ctrl-Return (GTK) for OK
|
// shift-return (Mac default) or Ctrl-Return (GTK) for OK
|
||||||
|
|
|
@ -83,6 +83,9 @@ public:
|
||||||
*/
|
*/
|
||||||
void ShowModeless();
|
void ShowModeless();
|
||||||
|
|
||||||
|
void OnHTMLLinkClicked( wxHtmlLinkEvent& event ) override;
|
||||||
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void reload();
|
void reload();
|
||||||
|
|
||||||
|
|
|
@ -312,3 +312,7 @@ Deprecated; use `intersectsArea()` instead.
|
||||||
(constraint track_width (min 1.0mm))
|
(constraint track_width (min 1.0mm))
|
||||||
(constraint connection_width (min 0.8mm))
|
(constraint connection_width (min 0.8mm))
|
||||||
(condition "A.NetClass == 'Power'"))
|
(condition "A.NetClass == 'Power'"))
|
||||||
|
|
||||||
|
### Documentation
|
||||||
|
|
||||||
|
For the full documentation see [https://docs.kicad.org](https://docs.kicad.org/GetMajorMinorVersion/pcbnew/#custom_design_rules).
|
|
@ -312,4 +312,8 @@ _HKI( "### Top-level Clauses\n"
|
||||||
" (rule high-current\n"
|
" (rule high-current\n"
|
||||||
" (constraint track_width (min 1.0mm))\n"
|
" (constraint track_width (min 1.0mm))\n"
|
||||||
" (constraint connection_width (min 0.8mm))\n"
|
" (constraint connection_width (min 0.8mm))\n"
|
||||||
" (condition \"A.NetClass == 'Power'\"))" );
|
" (condition \"A.NetClass == 'Power'\"))\n"
|
||||||
|
"\n"
|
||||||
|
"### Documentation\n"
|
||||||
|
"\n"
|
||||||
|
"For the full documentation see [https://docs.kicad.org](https://docs.kicad.org/GetMajorMinorVersion/pcbnew/#custom_design_rules)." );
|
||||||
|
|
Loading…
Reference in New Issue