38 m_mgrDialog( nullptr )
47 if( item && aProperty->
Name() ==
_HKI(
"Locked" ) )
52 aCommit->
Modify( generator );
56 generator->SetLocked(
false );
57 generator->SetLocked( item->
IsLocked() );
71 generator->EditStart(
this,
board(), commit );
72 generator->Update(
this,
board(), commit );
73 generator->EditPush(
this,
board(), commit );
92 auto tuningPatternCondition =
99 if( generator->GetGeneratorType() == wxS(
"tuning_pattern" ) )
167 wxString generatorType = aEvent.
Parameter<wxString>();
172 if( generatorType == wxS(
"*" ) )
173 commitMsg =
_(
"Regenerate All" );
177 if( generatorType == wxS(
"*" ) || generator->GetGeneratorType() == generatorType )
179 if( commitMsg.IsEmpty() )
180 commitMsg.Printf(
_(
"Update %s" ), generator->GetPluralName() );
182 generator->EditStart(
this,
board(), &commit );
183 generator->Update(
this,
board(), &commit );
184 generator->EditPush(
this,
board(), &commit, commitMsg, commitFlags );
190 frame()->RefreshCanvas();
206 for(
int i = aCollector.
GetCount() - 1; i >= 0; --i )
211 aCollector.
Remove( item );
215 GENERATORS generators;
220 generators.push_back( gen );
223#ifdef GENERATOR_ORDER
224 std::sort( generators.begin(), generators.end(),
227 return a->GetUpdateOrder() < b->GetUpdateOrder();
233 gen->EditStart(
this,
board(), &commit );
234 gen->Update(
this,
board(), &commit );
235 gen->EditPush(
this,
board(), &commit,
_(
"Regenerate Selected" ), commitFlags );
240 frame()->RefreshCanvas();
254 gen->
EditPush(
this,
board(), &commit,
_(
"Regenerate Item" ), commitFlags );
256 frame()->RefreshCanvas();
265 wxCHECK( commit, 0 );
281 wxASSERT( commit->
Empty() );
287 wxASSERT( commit->
Empty() );
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
PCB_GROUP * GetParentGroup() const
virtual bool IsLocked() const
int GetCount() const
Return the number of objects in the list.
void Remove(int aIndex)
Remove the item at aIndex (first position is 0).
Represent a set of changes (additions, deletions or modifications) of a data model (e....
COMMIT & Modify(EDA_ITEM *aItem, BASE_SCREEN *aScreen=nullptr)
Create an undo entry for an item that has been already modified.
bool Empty() const
Returns status of an item.
int GetStatus(EDA_ITEM *aItem, BASE_SCREEN *aScreen=nullptr)
bool Show(bool show) override
A base class for most all the KiCad significant classes used in schematics and boards.
KICAD_T Type() const
Returns the type of object.
Used when the right click button is pressed, or when the select tool is in effect.
Class that other classes need to inherit from, in order to be inspectable.
static TOOL_ACTION genPushEdit
static TOOL_ACTION genStartEdit
static TOOL_ACTION genRemove
static TOOL_ACTION generatorsShowManager
static TOOL_ACTION genUpdateEdit
static TOOL_ACTION regenerateAll
static TOOL_ACTION regenerateAllTuning
Generator tool.
static TOOL_ACTION regenerateSelected
static TOOL_ACTION genRevertEdit
The main frame for Pcbnew.
virtual void Remove(GENERATOR_TOOL *aTool, BOARD *aBoard, BOARD_COMMIT *aCommit)
virtual void EditRevert(GENERATOR_TOOL *aTool, BOARD *aBoard, BOARD_COMMIT *aCommit)
virtual void EditPush(GENERATOR_TOOL *aTool, BOARD *aBoard, BOARD_COMMIT *aCommit, const wxString &aCommitMsg=wxEmptyString, int aCommitFlags=0)
virtual void EditStart(GENERATOR_TOOL *aTool, BOARD *aBoard, BOARD_COMMIT *aCommit)
virtual bool Update(GENERATOR_TOOL *aTool, BOARD *aBoard, BOARD_COMMIT *aCommit)
const wxString & Name() const
static PROPERTY_MANAGER & Instance()
void RegisterListener(TYPE_ID aType, PROPERTY_LISTENER aListenerFunc)
Registers a listener for the given type.
static bool ShowAlways(const SELECTION &aSelection)
The default condition function (always returns true).
@ PCB_GENERATOR_T
class PCB_GENERATOR, generator on a layer