Commit 60c1cbe8 authored by jean-pierre charras's avatar jean-pierre charras
Browse files

fixed issues with wxWidgets 2.9.1

parent 141d5b5f
Loading
Loading
Loading
Loading
+20 −16
Original line number Diff line number Diff line
@@ -364,29 +364,33 @@ void WinEDA_DrawFrame::OnSize( wxSizeEvent& SizeEv )
}


/*
/** Function SetToolID
 * Enables the icon of the selected tool in the vertical toolbar.
 * (Or tool ID_NO_SELECT_BUTT default if no new selection)
 * if (id >= 0)
 * @param aId = new m_ID_current_state value (if aId >= 0)
 * @param aCursor = the new cursor shape (0 = default cursor)
 * @param aTitle = tool message in status bar
 * if (aId >= 0)
 * Updates all variables related:
 * Message m_ID_current_state, cursor
 * If (id < 0)
 * Only updates the variables message and cursor
 *      m_ID_current_state, cursor shape and message in status bar
 * If (aId < 0)
 *      Only updates the cursor shape and message in status bar
 *      (does not the current m_ID_current_state value
 */
void WinEDA_DrawFrame::SetToolID( int id, int new_cursor_id,
                                  const wxString& title )
void WinEDA_DrawFrame::SetToolID( int aId, int aCursor,
                                  const wxString& aToolMsg )
{
    // Keep default cursor in toolbars
    SetCursor( wxNullCursor );
    // Change Cursor in DrawPanel only
    if( DrawPanel )
    {
        DrawPanel->m_PanelDefaultCursor = new_cursor_id;
        DrawPanel->SetCursor( new_cursor_id );
        DrawPanel->m_PanelDefaultCursor = aCursor;
        DrawPanel->SetCursor( aCursor );
    }
    DisplayToolMsg( title );
    DisplayToolMsg( aToolMsg );

    if( id < 0 )
    if( aId < 0 )
        return;

    // Old Tool ID_NO_SELECT_BUTT active or inactive if no new tool.
@@ -400,7 +404,7 @@ void WinEDA_DrawFrame::SetToolID( int id, int new_cursor_id,
    }
    else
    {
        if( id )
        if( aId )
        {
            if( m_VToolBar )
                m_VToolBar->ToggleTool( ID_NO_SELECT_BUTT, FALSE );
@@ -412,18 +416,18 @@ void WinEDA_DrawFrame::SetToolID( int id, int new_cursor_id,
            m_VToolBar->ToggleTool( ID_NO_SELECT_BUTT, TRUE );
    }

    if( id )
    if( aId )
    {
        if( m_VToolBar )
            m_VToolBar->ToggleTool( id, TRUE );
            m_VToolBar->ToggleTool( aId, TRUE );

        if( m_AuxVToolBar )
            m_AuxVToolBar->ToggleTool( id, TRUE );
            m_AuxVToolBar->ToggleTool( aId, TRUE );
    }
    else if( m_VToolBar )
        m_VToolBar->ToggleTool( ID_NO_SELECT_BUTT, TRUE );

    m_ID_current_state = id;
    m_ID_current_state = aId;
    if( m_VToolBar )
        m_VToolBar->Refresh( );
}
+259 −261
Original line number Diff line number Diff line
@@ -104,13 +104,13 @@ void WinEDA_GerberFrame::Process_Special_Functions( wxCommandEvent& event )
            GetScreen()->m_BlockLocate.ClearItemsList();
        }
        if( m_ID_current_state == 0 )
            SetToolID( 0, wxCURSOR_ARROW, wxEmptyString );
            SetToolID( 0, 0, wxEmptyString );
        else
            SetCursor( DrawPanel->m_PanelCursor = DrawPanel->m_PanelDefaultCursor );
            DrawPanel->SetCursor( DrawPanel->m_PanelCursor = DrawPanel->m_PanelDefaultCursor );
        break;

    default:
        DrawPanel->UnManageCursor( 0, wxCURSOR_ARROW, wxEmptyString );
        DrawPanel->UnManageCursor( 0, 0, wxEmptyString );
        break;
    }

@@ -146,7 +146,7 @@ void WinEDA_GerberFrame::Process_Special_Functions( wxCommandEvent& event )
        break;

    case ID_POPUP_CLOSE_CURRENT_TOOL:
        SetToolID( 0, wxCURSOR_ARROW, wxEmptyString );
        SetToolID( 0, 0, wxEmptyString );
        break;

    case ID_POPUP_CANCEL_CURRENT_COMMAND:
@@ -172,8 +172,6 @@ void WinEDA_GerberFrame::Process_Special_Functions( wxCommandEvent& event )
            gerber_layer->m_Selected_Tool = tool;
            DrawPanel->Refresh( TRUE );
        }
        else
            DisplayError( this, _( "No layer selected" ) );
        break;

    case ID_GERBVIEW_SHOW_LIST_DCODES:
+0 −3
Original line number Diff line number Diff line
@@ -246,7 +246,6 @@ void WinEDA_GerberFrame::ReCreateHToolbar( void )
    // after adding the buttons to the toolbar, must call Realize() to reflect
    // the changes
    m_HToolBar->Realize();
    SetToolbars();
}


@@ -272,7 +271,6 @@ void WinEDA_GerberFrame::ReCreateVToolbar( void )
                         _( "Delete items" ) );

    m_VToolBar->Realize();
    SetToolbars();
}


@@ -339,5 +337,4 @@ void WinEDA_GerberFrame::ReCreateOptToolbar( void )


    m_OptionsToolBar->Realize();
    SetToolbars();
}
+2 −2
Original line number Diff line number Diff line
@@ -44,6 +44,8 @@ public:
                                            // ignore mouse events

    bool m_Block_Enable;                    // TRUE to accept Block Commands
    // useful to avoid false start block in certain cases
    // (like switch from a sheet to an other sheet
    int  m_CanStartBlock;                   // >= 0 (or >= n) if a block can
                                            // start
    bool m_PrintIsMirrored;                 // True when drawing in mirror
@@ -51,8 +53,6 @@ public:
                                            // because arcs are oriented, and
                                            // in mirror mode, orientations are
                                            // reversed
    // useful to avoid false start block in certain cases (like switch from a
    // sheet to an other sheet
    int  m_PanelDefaultCursor;              // Current mouse cursor default
                                            // shape id for this window
    int  m_PanelCursor;                     // Current mouse cursor shape id
+1 −2
Original line number Diff line number Diff line
@@ -104,8 +104,7 @@ public:
    virtual bool    OnRightClick( const wxPoint& MousePos,
                                  wxMenu*        PopMenu )  = 0;
    virtual void    ReCreateMenuBar();
    virtual void    SetToolID( int id, int new_cursor_id,
                               const wxString& title );
    virtual void    SetToolID( int aId, int aCursor, const wxString& aToolMsg );
    virtual void    UpdateStatusBar();

    PCB_SCREEN*     GetScreen() const
Loading