Pcbnew fix: "create array" extremely slow in GAL mode, due to a useless call of a time consuming method for each new item created.
This commit is contained in:
@@ -27,7 +27,6 @@
|
||||
*/
|
||||
|
||||
#include "array_creator.h"
|
||||
|
||||
#include <board_commit.h>
|
||||
|
||||
#include <dialogs/dialog_create_array.h>
|
||||
@@ -41,7 +40,6 @@ void ARRAY_CREATOR::Invoke()
|
||||
if( numItems == 0 )
|
||||
return;
|
||||
|
||||
BOARD_COMMIT commit( &m_parent );
|
||||
MODULE* const module = getModule();
|
||||
const bool isModuleEditor = module != NULL;
|
||||
|
||||
@@ -56,6 +54,8 @@ void ARRAY_CREATOR::Invoke()
|
||||
if( ret != wxID_OK || array_opts == NULL )
|
||||
return;
|
||||
|
||||
BOARD_COMMIT commit( &m_parent );
|
||||
|
||||
for ( int i = 0; i < numItems; ++i )
|
||||
{
|
||||
BOARD_ITEM* item = getNthItemToArray( i );
|
||||
|
||||
Reference in New Issue
Block a user