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

Try to fix Bug #1431391 (Unable to edit pins in Schematic library editor). It...

Try to fix Bug #1431391 (Unable to edit pins in Schematic library editor). It happens on XFCE, but also on Unity. This fix works on Unity. (it is due to the fact the dialog is not raised, for an unknown reason, and this bug depend on the way Eeschema and Libedit are run).
Add Ctrl+E hotkey in eeschema to edit a component with Libedit (similar to pcbnew Ctrl+E hotkey)
As usual, fix a few minor coverity warnings
parent adf2fc83
Loading
Loading
Loading
Loading
+7 −3
Original line number Original line Diff line number Diff line
@@ -35,10 +35,10 @@
#include <class_layer_box_selector.h>
#include <class_layer_box_selector.h>




LAYER_SELECTOR::LAYER_SELECTOR() :
LAYER_SELECTOR::LAYER_SELECTOR()
    m_layerhotkeys( true ),
    m_hotkeys( NULL )
{
{
    m_layerhotkeys = true;
    m_hotkeys = NULL;
}
}




@@ -79,6 +79,8 @@ LAYER_BOX_SELECTOR::LAYER_BOX_SELECTOR( wxWindow* parent, wxWindowID id,
    wxBitmapComboBox( parent, id, wxEmptyString, pos, size, n, choices, wxCB_READONLY ),
    wxBitmapComboBox( parent, id, wxEmptyString, pos, size, n, choices, wxCB_READONLY ),
    LAYER_SELECTOR()
    LAYER_SELECTOR()
{
{
    m_hotkeys = NULL;

    if( choices != NULL )
    if( choices != NULL )
        ResyncBitmapOnly();
        ResyncBitmapOnly();
}
}
@@ -90,6 +92,8 @@ LAYER_BOX_SELECTOR::LAYER_BOX_SELECTOR( wxWindow* parent, wxWindowID id,
    wxBitmapComboBox( parent, id, wxEmptyString, pos, size, choices, wxCB_READONLY ),
    wxBitmapComboBox( parent, id, wxEmptyString, pos, size, choices, wxCB_READONLY ),
    LAYER_SELECTOR()
    LAYER_SELECTOR()
{
{
    m_hotkeys = NULL;

    if( !choices.IsEmpty() )
    if( !choices.IsEmpty() )
        ResyncBitmapOnly();
        ResyncBitmapOnly();
}
}
+9 −1
Original line number Original line Diff line number Diff line
@@ -276,7 +276,15 @@ public:
     * @param aIsOwner true if the instance is the owner of item list
     * @param aIsOwner true if the instance is the owner of item list
     * (default = false)
     * (default = false)
     */
     */
    NETLIST_OBJECT_LIST( bool aIsOwner = false ) { m_isOwner = aIsOwner; }
    NETLIST_OBJECT_LIST( bool aIsOwner = false )
    {
        m_isOwner = aIsOwner;

        // Do not leave some members uninitialized:
        m_lastNetCode = 0;
        m_lastBusNetCode = 0;
    }

    ~NETLIST_OBJECT_LIST();
    ~NETLIST_OBJECT_LIST();


    void SetOwner( bool aIsOwner ) { m_isOwner = aIsOwner; }
    void SetOwner( bool aIsOwner ) { m_isOwner = aIsOwner; }
+5 −0
Original line number Original line Diff line number Diff line
@@ -49,6 +49,11 @@ DIALOG_LIB_EDIT_PIN::DIALOG_LIB_EDIT_PIN( EDA_DRAW_FRAME* parent, LIB_PIN* aPin
    // Set tab order
    // Set tab order
    m_textPadName->MoveAfterInTabOrder(m_textPinName);
    m_textPadName->MoveAfterInTabOrder(m_textPinName);
    m_sdbSizerButtonsOK->SetDefault();
    m_sdbSizerButtonsOK->SetDefault();

    GetSizer()->SetSizeHints( this );
    Raise();    // On Unity, ans some other windows manager,
                // this dialog is not always shown,
                // depending on this dialog is run. Force it to be shown
}
}




+2 −3
Original line number Original line Diff line number Diff line
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Oct  8 2012)
// C++ code generated with wxFormBuilder (version Jun  5 2014)
// http://www.wxformbuilder.org/
// http://www.wxformbuilder.org/
//
//
// PLEASE DO "NOT" EDIT THIS FILE!
// PLEASE DO "NOT" EDIT THIS FILE!
@@ -103,7 +103,7 @@ DIALOG_LIB_EDIT_PIN_BASE::DIALOG_LIB_EDIT_PIN_BASE( wxWindow* parent, wxWindowID
	bLeftSizer->Add( boarderSizer, 0, wxEXPAND|wxTOP|wxBOTTOM, 12 );
	bLeftSizer->Add( boarderSizer, 0, wxEXPAND|wxTOP|wxBOTTOM, 12 );
	
	
	
	
	bUpperSizer->Add( bLeftSizer, 2, wxEXPAND, 5 );
	bUpperSizer->Add( bLeftSizer, 1, wxEXPAND, 5 );
	
	
	wxBoxSizer* bRightSizer;
	wxBoxSizer* bRightSizer;
	bRightSizer = new wxBoxSizer( wxVERTICAL );
	bRightSizer = new wxBoxSizer( wxVERTICAL );
@@ -179,7 +179,6 @@ DIALOG_LIB_EDIT_PIN_BASE::DIALOG_LIB_EDIT_PIN_BASE( wxWindow* parent, wxWindowID
	
	
	this->SetSizer( mainSizer );
	this->SetSizer( mainSizer );
	this->Layout();
	this->Layout();
	mainSizer->Fit( this );
	
	
	this->Centre( wxBOTH );
	this->Centre( wxBOTH );
	
	
+5 −3
Original line number Original line Diff line number Diff line
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<wxFormBuilder_Project>
<wxFormBuilder_Project>
    <FileVersion major="1" minor="11" />
    <FileVersion major="1" minor="13" />
    <object class="Project" expanded="1">
    <object class="Project" expanded="1">
        <property name="class_decoration"></property>
        <property name="class_decoration"></property>
        <property name="code_generation">C++</property>
        <property name="code_generation">C++</property>
@@ -20,8 +20,10 @@
        <property name="path">.</property>
        <property name="path">.</property>
        <property name="precompiled_header"></property>
        <property name="precompiled_header"></property>
        <property name="relative_path">1</property>
        <property name="relative_path">1</property>
        <property name="skip_lua_events">1</property>
        <property name="skip_php_events">1</property>
        <property name="skip_php_events">1</property>
        <property name="skip_python_events">1</property>
        <property name="skip_python_events">1</property>
        <property name="ui_table">UI</property>
        <property name="use_enum">1</property>
        <property name="use_enum">1</property>
        <property name="use_microsoft_bom">0</property>
        <property name="use_microsoft_bom">0</property>
        <object class="Dialog" expanded="1">
        <object class="Dialog" expanded="1">
@@ -42,7 +44,7 @@
            <property name="minimum_size"></property>
            <property name="minimum_size"></property>
            <property name="name">DIALOG_LIB_EDIT_PIN_BASE</property>
            <property name="name">DIALOG_LIB_EDIT_PIN_BASE</property>
            <property name="pos"></property>
            <property name="pos"></property>
            <property name="size">-1,-1</property>
            <property name="size">515,370</property>
            <property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
            <property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
            <property name="subclass">DIALOG_SHIM; dialog_shim.h</property>
            <property name="subclass">DIALOG_SHIM; dialog_shim.h</property>
            <property name="title">Pin Properties</property>
            <property name="title">Pin Properties</property>
@@ -103,7 +105,7 @@
                        <object class="sizeritem" expanded="1">
                        <object class="sizeritem" expanded="1">
                            <property name="border">5</property>
                            <property name="border">5</property>
                            <property name="flag">wxEXPAND</property>
                            <property name="flag">wxEXPAND</property>
                            <property name="proportion">2</property>
                            <property name="proportion">1</property>
                            <object class="wxBoxSizer" expanded="1">
                            <object class="wxBoxSizer" expanded="1">
                                <property name="minimum_size"></property>
                                <property name="minimum_size"></property>
                                <property name="name">bLeftSizer</property>
                                <property name="name">bLeftSizer</property>
Loading