Provide some degree of compatibility for GetShownText in Python
This patch keeps the new API for GetShownText (argument order inverted), but also allows calling the member without parameters.
This commit is contained in:
parent
1020cdd7a6
commit
9c1509b8c3
|
@ -6,3 +6,25 @@
|
|||
#include <fp_textbox.h>
|
||||
%}
|
||||
|
||||
%extend FP_TEXT
|
||||
{
|
||||
%pythoncode
|
||||
%{
|
||||
# KiCad 6 API compatibility
|
||||
def GetShownText(self):
|
||||
r"""GetShownText(FP_TEXT self) -> wxString"""
|
||||
return _pcbnew.FP_TEXT_GetShownText(self, True, 0)
|
||||
%}
|
||||
}
|
||||
|
||||
|
||||
%extend FP_TEXTBOX
|
||||
{
|
||||
%pythoncode
|
||||
%{
|
||||
# KiCad 6 API compatibility
|
||||
def GetShownText(self):
|
||||
r"""GetShownText(FP_TEXTBOX self) -> wxString"""
|
||||
return _pcbnew.FP_TEXTBOX_GetShownText(self, True, 0)
|
||||
%}
|
||||
}
|
||||
|
|
|
@ -8,3 +8,38 @@
|
|||
#include <pcb_textbox.h>
|
||||
%}
|
||||
|
||||
|
||||
%extend EDA_TEXT
|
||||
{
|
||||
%pythoncode
|
||||
%{
|
||||
# KiCad 6 API compatibility
|
||||
def GetShownText(self):
|
||||
r"""GetShownText(EDA_TEXT self) -> wxString"""
|
||||
return _pcbnew.EDA_TEXT_GetShownText(self, True, 0)
|
||||
%}
|
||||
}
|
||||
|
||||
|
||||
%extend PCB_TEXT
|
||||
{
|
||||
%pythoncode
|
||||
%{
|
||||
# KiCad 6 API compatibility
|
||||
def GetShownText(self):
|
||||
r"""GetShownText(PCB_TEXT self) -> wxString"""
|
||||
return _pcbnew.PCB_TEXT_GetShownText(self, True, 0)
|
||||
%}
|
||||
}
|
||||
|
||||
|
||||
%extend PCB_TEXTBOX
|
||||
{
|
||||
%pythoncode
|
||||
%{
|
||||
# KiCad 6 API compatibility
|
||||
def GetShownText(self):
|
||||
r"""GetShownText(PCB_TEXTBOX self) -> wxString"""
|
||||
return _pcbnew.PCB_TEXTBOX_GetShownText(self, True, 0)
|
||||
%}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue