dialog_sch_sheet_props.cpp 717 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
#include <wx/string.h>
#include <dialog_sch_sheet_props.h>

DIALOG_SCH_SHEET_PROPS::DIALOG_SCH_SHEET_PROPS( wxWindow* parent ) :
    DIALOG_SCH_SHEET_PROPS_BASE( parent )
{
    m_textFileName->SetFocus();
    m_sdbSizer1OK->SetDefault();
}

void DIALOG_SCH_SHEET_PROPS::SetFileName( const wxString& aFileName )
{
    // Filenames are stored using unix notation
    wxString fname = aFileName;
#ifdef __WINDOWS__
    fname.Replace( wxT("/"), wxT("\\") );
#endif
    m_textFileName->SetValue( fname );
}

const wxString DIALOG_SCH_SHEET_PROPS::GetFileName()
{
    // Filenames are stored using unix notation
    wxString fname = m_textFileName->GetValue();
    fname.Replace( wxT("\\"), wxT("/") );
    return fname;
}