Commit 03502904 authored by https://launchpad.net/~john-j-beard's avatar https://launchpad.net/~john-j-beard Committed by jean-pierre charras
Browse files

Fix Bug #1426675 (Undo and cancel commands don't have effect for Duplicate...

Fix Bug #1426675 (Undo and cancel commands don't have effect for Duplicate operation in legacy mode)
parent 036404de
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -749,6 +749,7 @@ bool EDA_DRAW_FRAME::HandleBlockBegin( wxDC* aDC, int aKey, const wxPoint& aPosi
    case BLOCK_DRAG:                // Drag (block defined)
    case BLOCK_DRAG:                // Drag (block defined)
    case BLOCK_DRAG_ITEM:           // Drag from a drag item command
    case BLOCK_DRAG_ITEM:           // Drag from a drag item command
    case BLOCK_COPY:                // Copy
    case BLOCK_COPY:                // Copy
    case BLOCK_COPY_AND_INCREMENT:  // Copy and increment relevant references
    case BLOCK_DELETE:              // Delete
    case BLOCK_DELETE:              // Delete
    case BLOCK_SAVE:                // Save
    case BLOCK_SAVE:                // Save
    case BLOCK_ROTATE:              // Rotate 90 deg
    case BLOCK_ROTATE:              // Rotate 90 deg
+2 −1
Original line number Original line Diff line number Diff line
@@ -198,7 +198,8 @@ bool LIB_EDIT_FRAME::HandleBlockEnd( wxDC* DC )
    case BLOCK_SELECT_ITEMS_ONLY:
    case BLOCK_SELECT_ITEMS_ONLY:
        break;
        break;


    case BLOCK_MOVE_EXACT:
    case BLOCK_COPY_AND_INCREMENT:      // not used in Eeschema
    case BLOCK_MOVE_EXACT:              // not used in Eeschema
        break;
        break;
    }
    }


+1 −0
Original line number Original line Diff line number Diff line
@@ -51,6 +51,7 @@ typedef enum {
    BLOCK_IDLE,
    BLOCK_IDLE,
    BLOCK_MOVE,
    BLOCK_MOVE,
    BLOCK_COPY,
    BLOCK_COPY,
    BLOCK_COPY_AND_INCREMENT,
    BLOCK_SAVE,
    BLOCK_SAVE,
    BLOCK_DELETE,
    BLOCK_DELETE,
    BLOCK_PASTE,
    BLOCK_PASTE,
+8 −0
Original line number Original line Diff line number Diff line
@@ -314,6 +314,14 @@ public:


    /// @copydoc VIEW_ITEM::ViewGetLayers()
    /// @copydoc VIEW_ITEM::ViewGetLayers()
    virtual void ViewGetLayers( int aLayers[], int& aCount ) const;
    virtual void ViewGetLayers( int aLayers[], int& aCount ) const;

    /*!
     * Function IncrementItemReference
     * Implement if the concept of "incrementing" makes sense for an
     * item (e.g. modules and pads)
     * @return if item reference was incremented
     */
    virtual bool IncrementItemReference() { return false; }
};
};


#endif /* BOARD_ITEM_STRUCT_H */
#endif /* BOARD_ITEM_STRUCT_H */
+2 −2
Original line number Original line Diff line number Diff line
@@ -206,7 +206,7 @@ protected:
     * Duplicate selected item if possible and start a move
     * Duplicate selected item if possible and start a move
     * @param aIncrement increment the item number if appropriate
     * @param aIncrement increment the item number if appropriate
     */
     */
    void duplicateItem( bool aIncrement );
    void duplicateItems( bool aIncrement ); //override


    // protected so that PCB::IFACE::CreateWindow() is the only factory.
    // protected so that PCB::IFACE::CreateWindow() is the only factory.
    PCB_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent );
    PCB_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent );
@@ -794,7 +794,7 @@ public:
     * New location is determined by the current offset from the selected
     * New location is determined by the current offset from the selected
     * block's original location.
     * block's original location.
     */
     */
    void Block_Duplicate();
    void Block_Duplicate( bool aIncrement );


    void Process_Settings( wxCommandEvent& event );
    void Process_Settings( wxCommandEvent& event );
    void OnConfigurePcbOptions( wxCommandEvent& aEvent );
    void OnConfigurePcbOptions( wxCommandEvent& aEvent );
Loading