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

minor enhancements. fixed issues in microwave tools.

finished replacement of Get_Message (not very useful) by wxTextEntryDialog
parents e286b6f8 42022cfc
Loading
Loading
Loading
Loading
+7 −0
Original line number Original line Diff line number Diff line
@@ -175,6 +175,13 @@ SCH_ITEM* WinEDA_SchematicFrame::SchematicGeneralLocateAndDisplay( const wxPoint
        return DrawStruct;
        return DrawStruct;
    }
    }


    DrawStruct = (SCH_ITEM*) PickStruct( refpoint, GetScreen(), LABELITEM );
    if( DrawStruct )
    {
        ClearMsgPanel();
        return DrawStruct;
    }

    /* search for a pin */
    /* search for a pin */
    Pin = LocateAnyPin( (SCH_ITEM*) m_CurrentSheet->LastDrawList(), refpoint,
    Pin = LocateAnyPin( (SCH_ITEM*) m_CurrentSheet->LastDrawList(), refpoint,
                        &LibItem );
                        &LibItem );
+8 −0
Original line number Original line Diff line number Diff line
@@ -132,6 +132,8 @@ modified!\nYou must create a new power" ) );
    wxTextEntryDialog dlg( this, Field->m_Name, _( "Component field text" ), newtext );
    wxTextEntryDialog dlg( this, Field->m_Name, _( "Component field text" ), newtext );
    int diag = dlg.ShowModal();
    int diag = dlg.ShowModal();
    newtext = dlg.GetValue( );
    newtext = dlg.GetValue( );
    newtext.Trim( true );
    newtext.Trim( false );


    DrawPanel->MouseToCursorSchema();
    DrawPanel->MouseToCursorSchema();
    DrawPanel->m_IgnoreMouseEvents = FALSE;
    DrawPanel->m_IgnoreMouseEvents = FALSE;
@@ -306,6 +308,8 @@ void WinEDA_SchematicFrame::EditComponentReference( SCH_COMPONENT* Cmp, wxDC* DC
        return; // cancelled by user
        return; // cancelled by user


    ref = dlg.GetValue( );
    ref = dlg.GetValue( );
    ref.Trim( true );
    ref.Trim( false );


    if( !ref.IsEmpty() ) // New text entered
    if( !ref.IsEmpty() ) // New text entered
    {
    {
@@ -351,6 +355,8 @@ void WinEDA_SchematicFrame::EditComponentValue( SCH_COMPONENT* Cmp, wxDC* DC )
        return; // cancelled by user
        return; // cancelled by user


    message = dlg.GetValue( );
    message = dlg.GetValue( );
    message.Trim( true );
    message.Trim( false );


    if( !message.IsEmpty() )
    if( !message.IsEmpty() )
    {
    {
@@ -390,6 +396,8 @@ void WinEDA_SchematicFrame::EditComponentFootprint( SCH_COMPONENT* Cmp, wxDC* DC
        return; // cancelled by user
        return; // cancelled by user


    message = dlg.GetValue( );
    message = dlg.GetValue( );
    message.Trim( true );
    message.Trim( false );


    bool wasEmpty = false;
    bool wasEmpty = false;
    if( TextField->m_Text.IsEmpty() )
    if( TextField->m_Text.IsEmpty() )
+2 −0
Original line number Original line Diff line number Diff line
@@ -858,6 +858,8 @@ void TREE_PROJECT_FRAME::OnRenameFile( wxCommandEvent& )
        return; // cancelled by user
        return; // cancelled by user


    buffer = dlg.GetValue( );
    buffer = dlg.GetValue( );
    buffer.Trim( true );
    buffer.Trim( false );
    if( buffer.IsEmpty() )
    if( buffer.IsEmpty() )
        return;         // empty file name not allowed
        return;         // empty file name not allowed


+2 −0
Original line number Original line Diff line number Diff line
@@ -661,6 +661,8 @@ void DIALOG_DESIGN_RULES::OnAddNetclassClick( wxCommandEvent& event )
        return; // cancelled by user
        return; // cancelled by user


    class_name = dlg.GetValue( );
    class_name = dlg.GetValue( );
    class_name.Trim( true );
    class_name.Trim( false );
    if( class_name.IsEmpty() )
    if( class_name.IsEmpty() )
        return;         // empty name not allowed
        return;         // empty name not allowed


+3 −2
Original line number Original line Diff line number Diff line
@@ -525,6 +525,7 @@ int WinEDA_BasePcbFrame::Save_Module_In_Library( const wxString& aLibName,
        wxTextEntryDialog dlg( this, _( "Name:" ), _( "Save module" ), Name_Cmp );
        wxTextEntryDialog dlg( this, _( "Name:" ), _( "Save module" ), Name_Cmp );
        if( dlg.ShowModal() != wxID_OK )
        if( dlg.ShowModal() != wxID_OK )
            return 0; // cancelled by user
            return 0; // cancelled by user
        Name_Cmp = dlg.GetValue();
        Name_Cmp.Trim( true );
        Name_Cmp.Trim( true );
        Name_Cmp.Trim( false );
        Name_Cmp.Trim( false );
        if( Name_Cmp.IsEmpty() )
        if( Name_Cmp.IsEmpty() )
@@ -735,9 +736,9 @@ MODULE* WinEDA_BasePcbFrame::Create_1_Module( const wxString& aModuleName )
    {
    {
        wxTextEntryDialog dlg( this, _( "Module Reference:" ),
        wxTextEntryDialog dlg( this, _( "Module Reference:" ),
                         _( "Module Creation" ), moduleName );
                         _( "Module Creation" ), moduleName );
        int diag = dlg.ShowModal();
        if( dlg.ShowModal() != wxID_OK )
        if( diag != wxID_OK )
            return NULL;    //Aborted by user
            return NULL;    //Aborted by user
        moduleName = dlg.GetValue();
    }
    }
    moduleName.Trim( true );
    moduleName.Trim( true );
    moduleName.Trim( false );
    moduleName.Trim( false );
Loading