mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-14 10:13:19 +02:00
Yet even more open-coded dialog state-saving cleanup.
This commit is contained in:
parent
1b0ed24558
commit
833a5ee3ab
@ -60,11 +60,10 @@
|
|||||||
DIALOG_MIGRATE_BUSES::DIALOG_MIGRATE_BUSES( SCH_EDIT_FRAME* aParent )
|
DIALOG_MIGRATE_BUSES::DIALOG_MIGRATE_BUSES( SCH_EDIT_FRAME* aParent )
|
||||||
: DIALOG_MIGRATE_BUSES_BASE( aParent ), m_frame( aParent ), m_selected_index( 0 )
|
: DIALOG_MIGRATE_BUSES_BASE( aParent ), m_frame( aParent ), m_selected_index( 0 )
|
||||||
{
|
{
|
||||||
m_migration_list->Bind( wxEVT_LIST_ITEM_SELECTED,
|
OptOut( this ); // No control state save/restore
|
||||||
&DIALOG_MIGRATE_BUSES::onItemSelected, this );
|
|
||||||
|
|
||||||
m_btn_accept->Bind( wxEVT_COMMAND_BUTTON_CLICKED,
|
m_migration_list->Bind( wxEVT_LIST_ITEM_SELECTED, &DIALOG_MIGRATE_BUSES::onItemSelected, this );
|
||||||
&DIALOG_MIGRATE_BUSES::onAcceptClicked, this );
|
m_btn_accept->Bind( wxEVT_COMMAND_BUTTON_CLICKED, &DIALOG_MIGRATE_BUSES::onAcceptClicked, this );
|
||||||
|
|
||||||
loadGraphData();
|
loadGraphData();
|
||||||
updateUi();
|
updateUi();
|
||||||
@ -75,11 +74,8 @@ DIALOG_MIGRATE_BUSES::DIALOG_MIGRATE_BUSES( SCH_EDIT_FRAME* aParent )
|
|||||||
|
|
||||||
DIALOG_MIGRATE_BUSES::~DIALOG_MIGRATE_BUSES()
|
DIALOG_MIGRATE_BUSES::~DIALOG_MIGRATE_BUSES()
|
||||||
{
|
{
|
||||||
m_migration_list->Unbind( wxEVT_LIST_ITEM_SELECTED, &DIALOG_MIGRATE_BUSES::onItemSelected,
|
m_migration_list->Unbind( wxEVT_LIST_ITEM_SELECTED, &DIALOG_MIGRATE_BUSES::onItemSelected, this );
|
||||||
this );
|
m_btn_accept->Unbind( wxEVT_COMMAND_BUTTON_CLICKED, &DIALOG_MIGRATE_BUSES::onAcceptClicked, this );
|
||||||
|
|
||||||
m_btn_accept->Unbind( wxEVT_COMMAND_BUTTON_CLICKED, &DIALOG_MIGRATE_BUSES::onAcceptClicked,
|
|
||||||
this );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -119,6 +115,7 @@ void DIALOG_MIGRATE_BUSES::updateUi()
|
|||||||
for( auto& item : m_items )
|
for( auto& item : m_items )
|
||||||
{
|
{
|
||||||
wxString old = item.labels[0];
|
wxString old = item.labels[0];
|
||||||
|
|
||||||
for( unsigned j = 1; j < item.labels.size(); j++ )
|
for( unsigned j = 1; j < item.labels.size(); j++ )
|
||||||
old << ", " << item.labels[j];
|
old << ", " << item.labels[j];
|
||||||
|
|
||||||
@ -135,8 +132,7 @@ void DIALOG_MIGRATE_BUSES::updateUi()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
std::vector<wxString> DIALOG_MIGRATE_BUSES::getProposedLabels(
|
std::vector<wxString> DIALOG_MIGRATE_BUSES::getProposedLabels( const std::vector<wxString>& aLabelList )
|
||||||
const std::vector<wxString>& aLabelList )
|
|
||||||
{
|
{
|
||||||
int lowest_start = INT_MAX;
|
int lowest_start = INT_MAX;
|
||||||
int highest_end = -1;
|
int highest_end = -1;
|
||||||
|
@ -19,13 +19,10 @@
|
|||||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _DIALOG_MIGRATE_BUSES_H
|
#pragma once
|
||||||
#define _DIALOG_MIGRATE_BUSES_H
|
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include <sch_edit_frame.h>
|
#include <sch_edit_frame.h>
|
||||||
|
|
||||||
#include <dialog_migrate_buses_base.h>
|
#include <dialog_migrate_buses_base.h>
|
||||||
|
|
||||||
class CONNECTION_SUBGRAPH;
|
class CONNECTION_SUBGRAPH;
|
||||||
@ -34,25 +31,19 @@ class CONNECTION_SUBGRAPH;
|
|||||||
struct BUS_MIGRATION_STATUS
|
struct BUS_MIGRATION_STATUS
|
||||||
{
|
{
|
||||||
const CONNECTION_SUBGRAPH* subgraph;
|
const CONNECTION_SUBGRAPH* subgraph;
|
||||||
|
|
||||||
std::vector<wxString> labels;
|
std::vector<wxString> labels;
|
||||||
|
|
||||||
std::vector<wxString> possible_labels;
|
std::vector<wxString> possible_labels;
|
||||||
|
|
||||||
wxString approved_label;
|
wxString approved_label;
|
||||||
|
|
||||||
bool approved;
|
bool approved;
|
||||||
};
|
};
|
||||||
|
|
||||||
class DIALOG_MIGRATE_BUSES : public DIALOG_MIGRATE_BUSES_BASE
|
class DIALOG_MIGRATE_BUSES : public DIALOG_MIGRATE_BUSES_BASE
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
DIALOG_MIGRATE_BUSES( SCH_EDIT_FRAME* aParent );
|
DIALOG_MIGRATE_BUSES( SCH_EDIT_FRAME* aParent );
|
||||||
~DIALOG_MIGRATE_BUSES();
|
~DIALOG_MIGRATE_BUSES();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
void loadGraphData();
|
void loadGraphData();
|
||||||
|
|
||||||
void updateUi();
|
void updateUi();
|
||||||
@ -63,12 +54,9 @@ private:
|
|||||||
|
|
||||||
void onAcceptClicked( wxCommandEvent& aEvent );
|
void onAcceptClicked( wxCommandEvent& aEvent );
|
||||||
|
|
||||||
|
private:
|
||||||
SCH_EDIT_FRAME* m_frame;
|
SCH_EDIT_FRAME* m_frame;
|
||||||
|
|
||||||
unsigned m_selected_index;
|
unsigned m_selected_index;
|
||||||
|
|
||||||
std::vector<BUS_MIGRATION_STATUS> m_items;
|
std::vector<BUS_MIGRATION_STATUS> m_items;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
|
||||||
|
@ -86,7 +86,7 @@ DIALOG_PLOT_SCHEMATIC::DIALOG_PLOT_SCHEMATIC( SCH_EDIT_FRAME* aEditFrame, wxWind
|
|||||||
}
|
}
|
||||||
|
|
||||||
// DIALOG_SHIM needs a unique hash_key because classname will be the same for both job and
|
// DIALOG_SHIM needs a unique hash_key because classname will be the same for both job and
|
||||||
// non-job versions (which have different sizes).
|
// non-job versions.
|
||||||
m_hash_key = TO_UTF8( GetTitle() );
|
m_hash_key = TO_UTF8( GetTitle() );
|
||||||
|
|
||||||
for( COLOR_SETTINGS* settings : Pgm().GetSettingsManager().GetColorSettingsList() )
|
for( COLOR_SETTINGS* settings : Pgm().GetSettingsManager().GetColorSettingsList() )
|
||||||
|
@ -53,16 +53,9 @@ public:
|
|||||||
*/
|
*/
|
||||||
DIALOG_RESCUE_EACH( wxWindow* aParent, RESCUER& aRescuer, SCH_SHEET_PATH* aCurrentSheet,
|
DIALOG_RESCUE_EACH( wxWindow* aParent, RESCUER& aRescuer, SCH_SHEET_PATH* aCurrentSheet,
|
||||||
EDA_DRAW_PANEL_GAL::GAL_TYPE aGalBackEndType, bool aAskShowAgain );
|
EDA_DRAW_PANEL_GAL::GAL_TYPE aGalBackEndType, bool aAskShowAgain );
|
||||||
|
~DIALOG_RESCUE_EACH() = default;
|
||||||
~DIALOG_RESCUE_EACH();
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
SYMBOL_PREVIEW_WIDGET* m_previewNewWidget;
|
|
||||||
SYMBOL_PREVIEW_WIDGET* m_previewOldWidget;
|
|
||||||
RESCUER* m_Rescuer;
|
|
||||||
SCH_SHEET_PATH* m_currentSheet;
|
|
||||||
bool m_AskShowAgain;
|
|
||||||
|
|
||||||
bool TransferDataToWindow() override;
|
bool TransferDataToWindow() override;
|
||||||
bool TransferDataFromWindow() override;
|
bool TransferDataFromWindow() override;
|
||||||
void PopulateConflictList();
|
void PopulateConflictList();
|
||||||
@ -74,32 +67,33 @@ private:
|
|||||||
// Display the 2 items (old in cache and new in library) corresponding to the
|
// Display the 2 items (old in cache and new in library) corresponding to the
|
||||||
// selected conflict in m_ListOfConflicts
|
// selected conflict in m_ListOfConflicts
|
||||||
void displayItemsInConflict();
|
void displayItemsInConflict();
|
||||||
|
|
||||||
|
private:
|
||||||
|
SYMBOL_PREVIEW_WIDGET* m_previewNewWidget;
|
||||||
|
SYMBOL_PREVIEW_WIDGET* m_previewOldWidget;
|
||||||
|
RESCUER* m_rescuer;
|
||||||
|
SCH_SHEET_PATH* m_currentSheet;
|
||||||
|
bool m_askShowAgain;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
DIALOG_RESCUE_EACH::DIALOG_RESCUE_EACH( wxWindow* aParent,
|
DIALOG_RESCUE_EACH::DIALOG_RESCUE_EACH( wxWindow* aParent, RESCUER& aRescuer, SCH_SHEET_PATH* aCurrentSheet,
|
||||||
RESCUER& aRescuer,
|
EDA_DRAW_PANEL_GAL::GAL_TYPE aGalBackEndType, bool aAskShowAgain ) :
|
||||||
SCH_SHEET_PATH* aCurrentSheet,
|
DIALOG_RESCUE_EACH_BASE( aParent ),
|
||||||
EDA_DRAW_PANEL_GAL::GAL_TYPE aGalBackEndType,
|
m_rescuer( &aRescuer ),
|
||||||
bool aAskShowAgain )
|
|
||||||
: DIALOG_RESCUE_EACH_BASE( aParent ),
|
|
||||||
m_Rescuer( &aRescuer ),
|
|
||||||
m_currentSheet( aCurrentSheet ),
|
m_currentSheet( aCurrentSheet ),
|
||||||
m_AskShowAgain( aAskShowAgain )
|
m_askShowAgain( aAskShowAgain )
|
||||||
{
|
{
|
||||||
wxASSERT( aCurrentSheet );
|
wxASSERT( aCurrentSheet );
|
||||||
|
|
||||||
m_previewOldWidget = new SYMBOL_PREVIEW_WIDGET( m_previewOldPanel, &Kiway(), false,
|
m_previewOldWidget = new SYMBOL_PREVIEW_WIDGET( m_previewOldPanel, &Kiway(), false, aGalBackEndType );
|
||||||
aGalBackEndType );
|
|
||||||
m_SizerOldPanel->Add( m_previewOldWidget, 1, wxEXPAND | wxALL, 5 );
|
m_SizerOldPanel->Add( m_previewOldWidget, 1, wxEXPAND | wxALL, 5 );
|
||||||
|
|
||||||
m_previewNewWidget = new SYMBOL_PREVIEW_WIDGET( m_previewNewPanel, &Kiway(), false,
|
m_previewNewWidget = new SYMBOL_PREVIEW_WIDGET( m_previewNewPanel, &Kiway(), false, aGalBackEndType );
|
||||||
aGalBackEndType );
|
|
||||||
m_SizerNewPanel->Add( m_previewNewWidget, 1, wxEXPAND | wxALL, 5 );
|
m_SizerNewPanel->Add( m_previewNewWidget, 1, wxEXPAND | wxALL, 5 );
|
||||||
|
|
||||||
// Set the info message, customized to include the proper suffix.
|
// Set the info message, customized to include the proper suffix.
|
||||||
wxString info =
|
wxString info = _( "This schematic was made using older symbol libraries which may break the "
|
||||||
_( "This schematic was made using older symbol libraries which may break the "
|
|
||||||
"schematic. Some symbols may need to be linked to a different symbol name. "
|
"schematic. Some symbols may need to be linked to a different symbol name. "
|
||||||
"Some symbols may need to be \"rescued\" (copied and renamed) into a new library.\n\n"
|
"Some symbols may need to be \"rescued\" (copied and renamed) into a new library.\n\n"
|
||||||
"The following changes are recommended to update the project." );
|
"The following changes are recommended to update the project." );
|
||||||
@ -117,8 +111,7 @@ DIALOG_RESCUE_EACH::DIALOG_RESCUE_EACH( wxWindow* aParent,
|
|||||||
|
|
||||||
int width = dc.GetTextExtent( header ).GetWidth() * 1.25;
|
int width = dc.GetTextExtent( header ).GetWidth() * 1.25;
|
||||||
|
|
||||||
m_ListOfConflicts->AppendToggleColumn( header, wxDATAVIEW_CELL_ACTIVATABLE, width,
|
m_ListOfConflicts->AppendToggleColumn( header, wxDATAVIEW_CELL_ACTIVATABLE, width, wxALIGN_CENTER );
|
||||||
wxALIGN_CENTER );
|
|
||||||
|
|
||||||
header = _( "Symbol Name" );
|
header = _( "Symbol Name" );
|
||||||
width = dc.GetTextExtent( header ).GetWidth() * 2;
|
width = dc.GetTextExtent( header ).GetWidth() * 2;
|
||||||
@ -158,11 +151,6 @@ DIALOG_RESCUE_EACH::DIALOG_RESCUE_EACH( wxWindow* aParent,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
DIALOG_RESCUE_EACH::~DIALOG_RESCUE_EACH()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
bool DIALOG_RESCUE_EACH::TransferDataToWindow()
|
bool DIALOG_RESCUE_EACH::TransferDataToWindow()
|
||||||
{
|
{
|
||||||
if( !wxDialog::TransferDataToWindow() )
|
if( !wxDialog::TransferDataToWindow() )
|
||||||
@ -171,7 +159,7 @@ bool DIALOG_RESCUE_EACH::TransferDataToWindow()
|
|||||||
PopulateConflictList();
|
PopulateConflictList();
|
||||||
PopulateInstanceList();
|
PopulateInstanceList();
|
||||||
|
|
||||||
if( !m_AskShowAgain )
|
if( !m_askShowAgain )
|
||||||
m_btnNeverShowAgain->Hide();
|
m_btnNeverShowAgain->Hide();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@ -182,7 +170,7 @@ void DIALOG_RESCUE_EACH::PopulateConflictList()
|
|||||||
{
|
{
|
||||||
wxVector<wxVariant> data;
|
wxVector<wxVariant> data;
|
||||||
|
|
||||||
for( RESCUE_CANDIDATE& each_candidate : m_Rescuer->m_all_candidates )
|
for( RESCUE_CANDIDATE& each_candidate : m_rescuer->m_all_candidates )
|
||||||
{
|
{
|
||||||
data.clear();
|
data.clear();
|
||||||
data.push_back( wxVariant( true ) );
|
data.push_back( wxVariant( true ) );
|
||||||
@ -192,7 +180,7 @@ void DIALOG_RESCUE_EACH::PopulateConflictList()
|
|||||||
m_ListOfConflicts->AppendItem( data );
|
m_ListOfConflicts->AppendItem( data );
|
||||||
}
|
}
|
||||||
|
|
||||||
if( !m_Rescuer->m_all_candidates.empty() )
|
if( !m_rescuer->m_all_candidates.empty() )
|
||||||
{
|
{
|
||||||
// Select the first choice
|
// Select the first choice
|
||||||
m_ListOfConflicts->SelectRow( 0 );
|
m_ListOfConflicts->SelectRow( 0 );
|
||||||
@ -212,12 +200,12 @@ void DIALOG_RESCUE_EACH::PopulateInstanceList()
|
|||||||
if( row == wxNOT_FOUND )
|
if( row == wxNOT_FOUND )
|
||||||
row = 0;
|
row = 0;
|
||||||
|
|
||||||
RESCUE_CANDIDATE& selected_part = m_Rescuer->m_all_candidates[row];
|
RESCUE_CANDIDATE& selected_part = m_rescuer->m_all_candidates[row];
|
||||||
|
|
||||||
wxVector<wxVariant> data;
|
wxVector<wxVariant> data;
|
||||||
int count = 0;
|
int count = 0;
|
||||||
|
|
||||||
for( SCH_SYMBOL* eachSymbol : *m_Rescuer->GetSymbols() )
|
for( SCH_SYMBOL* eachSymbol : *m_rescuer->GetSymbols() )
|
||||||
{
|
{
|
||||||
if( eachSymbol->GetLibId().Format() != UTF8( selected_part.GetRequestedName() ) )
|
if( eachSymbol->GetLibId().Format() != UTF8( selected_part.GetRequestedName() ) )
|
||||||
continue;
|
continue;
|
||||||
@ -247,13 +235,11 @@ void DIALOG_RESCUE_EACH::displayItemsInConflict()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
RESCUE_CANDIDATE& selected_part = m_Rescuer->m_all_candidates[row];
|
RESCUE_CANDIDATE& selected_part = m_rescuer->m_all_candidates[row];
|
||||||
|
|
||||||
m_previewOldWidget->DisplayPart( selected_part.GetCacheCandidate(),
|
m_previewOldWidget->DisplayPart( selected_part.GetCacheCandidate(), selected_part.GetUnit(),
|
||||||
selected_part.GetUnit(),
|
|
||||||
selected_part.GetConvert() );
|
selected_part.GetConvert() );
|
||||||
m_previewNewWidget->DisplayPart( selected_part.GetLibCandidate(),
|
m_previewNewWidget->DisplayPart( selected_part.GetLibCandidate(), selected_part.GetUnit(),
|
||||||
selected_part.GetUnit(),
|
|
||||||
selected_part.GetConvert() );
|
selected_part.GetConvert() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -277,14 +263,14 @@ bool DIALOG_RESCUE_EACH::TransferDataFromWindow()
|
|||||||
if( !wxDialog::TransferDataFromWindow() )
|
if( !wxDialog::TransferDataFromWindow() )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
for( size_t index = 0; index < m_Rescuer->GetCandidateCount(); ++index )
|
for( size_t index = 0; index < m_rescuer->GetCandidateCount(); ++index )
|
||||||
{
|
{
|
||||||
wxVariant val;
|
wxVariant val;
|
||||||
m_ListOfConflicts->GetValue( val, index, 0 );
|
m_ListOfConflicts->GetValue( val, index, 0 );
|
||||||
bool rescue_part = val.GetBool();
|
bool rescue_part = val.GetBool();
|
||||||
|
|
||||||
if( rescue_part )
|
if( rescue_part )
|
||||||
m_Rescuer->m_chosen_candidates.push_back( &m_Rescuer->m_all_candidates[index] );
|
m_rescuer->m_chosen_candidates.push_back( &m_rescuer->m_all_candidates[index] );
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@ -308,7 +294,7 @@ void DIALOG_RESCUE_EACH::OnNeverShowClick( wxCommandEvent& aEvent )
|
|||||||
if( cfg )
|
if( cfg )
|
||||||
cfg->m_RescueNeverShow = true;
|
cfg->m_RescueNeverShow = true;
|
||||||
|
|
||||||
m_Rescuer->m_chosen_candidates.clear();
|
m_rescuer->m_chosen_candidates.clear();
|
||||||
Close();
|
Close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -316,7 +302,7 @@ void DIALOG_RESCUE_EACH::OnNeverShowClick( wxCommandEvent& aEvent )
|
|||||||
|
|
||||||
void DIALOG_RESCUE_EACH::OnCancelClick( wxCommandEvent& aEvent )
|
void DIALOG_RESCUE_EACH::OnCancelClick( wxCommandEvent& aEvent )
|
||||||
{
|
{
|
||||||
m_Rescuer->m_chosen_candidates.clear();
|
m_rescuer->m_chosen_candidates.clear();
|
||||||
DIALOG_RESCUE_EACH_BASE::OnCancelClick( aEvent );
|
DIALOG_RESCUE_EACH_BASE::OnCancelClick( aEvent );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,31 +25,22 @@
|
|||||||
#include <sch_edit_frame.h>
|
#include <sch_edit_frame.h>
|
||||||
#include <wildcards_and_files_ext.h>
|
#include <wildcards_and_files_ext.h>
|
||||||
#include <confirm.h>
|
#include <confirm.h>
|
||||||
#include <schematic.h>
|
|
||||||
#include <widgets/std_bitmap_button.h>
|
#include <widgets/std_bitmap_button.h>
|
||||||
#include <wx/filedlg.h>
|
#include <wx/filedlg.h>
|
||||||
|
|
||||||
#include <dialog_sch_import_settings.h>
|
#include <dialog_sch_import_settings.h>
|
||||||
|
|
||||||
|
|
||||||
wxString DIALOG_SCH_IMPORT_SETTINGS::m_filePath; // remember for session
|
|
||||||
|
|
||||||
|
DIALOG_SCH_IMPORT_SETTINGS::DIALOG_SCH_IMPORT_SETTINGS( wxWindow* aParent, SCH_EDIT_FRAME* aFrame ) :
|
||||||
DIALOG_SCH_IMPORT_SETTINGS::DIALOG_SCH_IMPORT_SETTINGS( wxWindow* aParent,
|
|
||||||
SCH_EDIT_FRAME* aFrame ) :
|
|
||||||
DIALOG_SCH_IMPORT_SETTINGS_BASE( aParent ),
|
DIALOG_SCH_IMPORT_SETTINGS_BASE( aParent ),
|
||||||
m_frame( aFrame )
|
m_frame( aFrame )
|
||||||
{
|
{
|
||||||
m_browseButton->SetBitmap( KiBitmapBundle( BITMAPS::small_folder ) );
|
m_browseButton->SetBitmap( KiBitmapBundle( BITMAPS::small_folder ) );
|
||||||
|
|
||||||
SetupStandardButtons( { { wxID_OK, _( "Import Settings" ) } } );
|
SetupStandardButtons( { { wxID_OK, _( "Import Settings" ) } } );
|
||||||
}
|
|
||||||
|
|
||||||
|
finishDialogSettings();
|
||||||
bool DIALOG_SCH_IMPORT_SETTINGS::TransferDataToWindow()
|
|
||||||
{
|
|
||||||
m_filePathCtrl->SetValue( m_filePath );
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -59,8 +50,7 @@ void DIALOG_SCH_IMPORT_SETTINGS::OnBrowseClicked( wxCommandEvent& event )
|
|||||||
fn.SetExt( FILEEXT::ProjectFileExtension );
|
fn.SetExt( FILEEXT::ProjectFileExtension );
|
||||||
|
|
||||||
wxFileDialog dlg( this, _( "Import Settings From" ), fn.GetPath(), fn.GetFullName(),
|
wxFileDialog dlg( this, _( "Import Settings From" ), fn.GetPath(), fn.GetFullName(),
|
||||||
FILEEXT::ProjectFileWildcard(),
|
FILEEXT::ProjectFileWildcard(), wxFD_OPEN | wxFD_FILE_MUST_EXIST | wxFD_CHANGE_DIR );
|
||||||
wxFD_OPEN | wxFD_FILE_MUST_EXIST | wxFD_CHANGE_DIR );
|
|
||||||
|
|
||||||
if( dlg.ShowModal() == wxID_OK )
|
if( dlg.ShowModal() == wxID_OK )
|
||||||
m_filePathCtrl->SetValue( dlg.GetPath() );
|
m_filePathCtrl->SetValue( dlg.GetPath() );
|
||||||
@ -76,7 +66,6 @@ bool DIALOG_SCH_IMPORT_SETTINGS::TransferDataFromWindow()
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_filePath = m_filePathCtrl->GetValue();
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,13 +21,10 @@
|
|||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
#ifndef KICAD_DIALOG_SCH_IMPORT_SETTINGS_H
|
|
||||||
#define KICAD_DIALOG_SCH_IMPORT_SETTINGS_H
|
|
||||||
|
|
||||||
#include "dialog_sch_import_settings_base.h"
|
#include "dialog_sch_import_settings_base.h"
|
||||||
|
|
||||||
|
|
||||||
class SCH_EDIT_FRAME;
|
class SCH_EDIT_FRAME;
|
||||||
|
|
||||||
|
|
||||||
@ -39,14 +36,11 @@ public:
|
|||||||
void OnBrowseClicked( wxCommandEvent& event ) override;
|
void OnBrowseClicked( wxCommandEvent& event ) override;
|
||||||
void OnSelectAll( wxCommandEvent& event ) override;
|
void OnSelectAll( wxCommandEvent& event ) override;
|
||||||
|
|
||||||
bool TransferDataToWindow() override;
|
|
||||||
bool TransferDataFromWindow() override;
|
bool TransferDataFromWindow() override;
|
||||||
|
|
||||||
wxString GetFilePath() { return m_filePath; }
|
wxString GetFilePath() { return m_filePathCtrl->GetValue(); }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
SCH_EDIT_FRAME* m_frame;
|
SCH_EDIT_FRAME* m_frame;
|
||||||
static wxString m_filePath;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif //KICAD_DIALOG_SCH_IMPORT_SETTINGS_H
|
|
||||||
|
@ -95,8 +95,7 @@ DIALOG_SCHEMATIC_SETUP::DIALOG_SCHEMATIC_SETUP( SCH_EDIT_FRAME* aFrame ) :
|
|||||||
{
|
{
|
||||||
ERC_SETTINGS& ercSettings = m_frame->Schematic().ErcSettings();
|
ERC_SETTINGS& ercSettings = m_frame->Schematic().ErcSettings();
|
||||||
return new PANEL_SETUP_SEVERITIES( aParent, ERC_ITEM::GetItemsWithSeverities(),
|
return new PANEL_SETUP_SEVERITIES( aParent, ERC_ITEM::GetItemsWithSeverities(),
|
||||||
ercSettings.m_ERCSeverities,
|
ercSettings.m_ERCSeverities, m_pinToPinError.get() );
|
||||||
m_pinToPinError.get() );
|
|
||||||
}, _( "Violation Severity" ) );
|
}, _( "Violation Severity" ) );
|
||||||
|
|
||||||
m_pinMapPage = m_treebook->GetPageCount();
|
m_pinMapPage = m_treebook->GetPageCount();
|
||||||
@ -115,8 +114,7 @@ DIALOG_SCHEMATIC_SETUP::DIALOG_SCHEMATIC_SETUP( SCH_EDIT_FRAME* aFrame ) :
|
|||||||
SCHEMATIC& schematic = m_frame->Schematic();
|
SCHEMATIC& schematic = m_frame->Schematic();
|
||||||
return new PANEL_SETUP_NETCLASSES( aParent, m_frame,
|
return new PANEL_SETUP_NETCLASSES( aParent, m_frame,
|
||||||
m_frame->Prj().GetProjectFile().NetSettings(),
|
m_frame->Prj().GetProjectFile().NetSettings(),
|
||||||
schematic.GetNetClassAssignmentCandidates(),
|
schematic.GetNetClassAssignmentCandidates(), true );
|
||||||
true );
|
|
||||||
}, _( "Net Classes" ) );
|
}, _( "Net Classes" ) );
|
||||||
|
|
||||||
m_busesPage = m_treebook->GetPageCount();
|
m_busesPage = m_treebook->GetPageCount();
|
||||||
@ -152,8 +150,8 @@ DIALOG_SCHEMATIC_SETUP::DIALOG_SCHEMATIC_SETUP( SCH_EDIT_FRAME* aFrame ) :
|
|||||||
|
|
||||||
if( Prj().IsReadOnly() )
|
if( Prj().IsReadOnly() )
|
||||||
{
|
{
|
||||||
m_infoBar->ShowMessage( _( "Project is missing or read-only. Settings will not be "
|
m_infoBar->ShowMessage( _( "Project is missing or read-only. Settings will not be editable." ),
|
||||||
"editable." ), wxICON_WARNING );
|
wxICON_WARNING );
|
||||||
}
|
}
|
||||||
|
|
||||||
wxBookCtrlEvent evt( wxEVT_TREEBOOK_PAGE_CHANGED, wxID_ANY, 0 );
|
wxBookCtrlEvent evt( wxEVT_TREEBOOK_PAGE_CHANGED, wxID_ANY, 0 );
|
||||||
@ -162,11 +160,6 @@ DIALOG_SCHEMATIC_SETUP::DIALOG_SCHEMATIC_SETUP( SCH_EDIT_FRAME* aFrame ) :
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
DIALOG_SCHEMATIC_SETUP::~DIALOG_SCHEMATIC_SETUP()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void DIALOG_SCHEMATIC_SETUP::onPageChanged( wxBookCtrlEvent& aEvent )
|
void DIALOG_SCHEMATIC_SETUP::onPageChanged( wxBookCtrlEvent& aEvent )
|
||||||
{
|
{
|
||||||
PAGED_DIALOG::onPageChanged( aEvent );
|
PAGED_DIALOG::onPageChanged( aEvent );
|
||||||
|
@ -17,9 +17,7 @@
|
|||||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
#ifndef KICAD_DIALOG_SCHEMATIC_SETUP_H
|
|
||||||
#define KICAD_DIALOG_SCHEMATIC_SETUP_H
|
|
||||||
|
|
||||||
#include <widgets/paged_dialog.h>
|
#include <widgets/paged_dialog.h>
|
||||||
|
|
||||||
@ -38,13 +36,14 @@ class DIALOG_SCHEMATIC_SETUP : public PAGED_DIALOG
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
DIALOG_SCHEMATIC_SETUP( SCH_EDIT_FRAME* aFrame );
|
DIALOG_SCHEMATIC_SETUP( SCH_EDIT_FRAME* aFrame );
|
||||||
~DIALOG_SCHEMATIC_SETUP();
|
~DIALOG_SCHEMATIC_SETUP() = default;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// event handlers
|
// event handlers
|
||||||
void onPageChanged( wxBookCtrlEvent& aEvent ) override;
|
void onPageChanged( wxBookCtrlEvent& aEvent ) override;
|
||||||
void onAuxiliaryAction( wxCommandEvent& aEvent ) override;
|
void onAuxiliaryAction( wxCommandEvent& aEvent ) override;
|
||||||
|
|
||||||
|
protected:
|
||||||
SCH_EDIT_FRAME* m_frame;
|
SCH_EDIT_FRAME* m_frame;
|
||||||
|
|
||||||
std::shared_ptr<ERC_ITEM> m_pinToPinError;
|
std::shared_ptr<ERC_ITEM> m_pinToPinError;
|
||||||
@ -60,6 +59,3 @@ protected:
|
|||||||
size_t m_netclassesPage;
|
size_t m_netclassesPage;
|
||||||
size_t m_embeddedFilesPage;
|
size_t m_embeddedFilesPage;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#endif //KICAD_DIALOG_SCHEMATIC_SETUP_H
|
|
||||||
|
@ -44,7 +44,7 @@ DIALOG_SHAPE_PROPERTIES::DIALOG_SHAPE_PROPERTIES( SCH_BASE_FRAME* aParent, SCH_S
|
|||||||
|
|
||||||
// DIALOG_SHIM needs a unique hash_key because classname is not sufficient because the
|
// DIALOG_SHIM needs a unique hash_key because classname is not sufficient because the
|
||||||
// different shapes (and even whether or not we're within the symbol editor) cause different
|
// different shapes (and even whether or not we're within the symbol editor) cause different
|
||||||
// dialog layouts).
|
// dialog layouts.
|
||||||
m_hash_key = TO_UTF8( GetTitle() + aParent->GetName() );
|
m_hash_key = TO_UTF8( GetTitle() + aParent->GetName() );
|
||||||
|
|
||||||
m_helpLabel1->SetFont( KIUI::GetInfoFont( this ).Italic() );
|
m_helpLabel1->SetFont( KIUI::GetInfoFont( this ).Italic() );
|
||||||
|
@ -37,8 +37,7 @@
|
|||||||
#include <gr_text.h>
|
#include <gr_text.h>
|
||||||
|
|
||||||
|
|
||||||
DIALOG_SHEET_PIN_PROPERTIES::DIALOG_SHEET_PIN_PROPERTIES( SCH_EDIT_FRAME* parent,
|
DIALOG_SHEET_PIN_PROPERTIES::DIALOG_SHEET_PIN_PROPERTIES( SCH_EDIT_FRAME* parent, SCH_SHEET_PIN* aPin ) :
|
||||||
SCH_SHEET_PIN* aPin ) :
|
|
||||||
DIALOG_SHEET_PIN_PROPERTIES_BASE( parent ),
|
DIALOG_SHEET_PIN_PROPERTIES_BASE( parent ),
|
||||||
m_frame( parent ),
|
m_frame( parent ),
|
||||||
m_sheetPin( aPin ),
|
m_sheetPin( aPin ),
|
||||||
@ -70,18 +69,7 @@ DIALOG_SHEET_PIN_PROPERTIES::DIALOG_SHEET_PIN_PROPERTIES( SCH_EDIT_FRAME* parent
|
|||||||
// Now all widgets have the size fixed, call FinishDialogSettings
|
// Now all widgets have the size fixed, call FinishDialogSettings
|
||||||
finishDialogSettings();
|
finishDialogSettings();
|
||||||
|
|
||||||
/* This ugly hack fixes a bug in wxWidgets 2.8.7 and likely earlier versions for
|
// On some windows manager (Unity, XFCE), this dialog is not always raised, depending on how it is run.
|
||||||
* the flex grid sizer in wxGTK that prevents the last column from being sized
|
|
||||||
* correctly. It doesn't cause any problems on win32 so it doesn't need to wrapped
|
|
||||||
* in ugly #ifdef __WXGTK__ #endif.
|
|
||||||
*/
|
|
||||||
Layout();
|
|
||||||
Fit();
|
|
||||||
SetMinSize( GetSize() );
|
|
||||||
|
|
||||||
// On some windows manager (Unity, XFCE), this dialog is
|
|
||||||
// not always raised, depending on this dialog is run.
|
|
||||||
// Force it to be raised
|
|
||||||
Raise();
|
Raise();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -143,8 +131,7 @@ bool DIALOG_SHEET_PIN_PROPERTIES::TransferDataFromWindow()
|
|||||||
|
|
||||||
if( m_fontCtrl->HaveFontSelection() )
|
if( m_fontCtrl->HaveFontSelection() )
|
||||||
{
|
{
|
||||||
m_sheetPin->SetFont( m_fontCtrl->GetFontSelection( m_bold->IsChecked(),
|
m_sheetPin->SetFont( m_fontCtrl->GetFontSelection( m_bold->IsChecked(), m_italic->IsChecked() ) );
|
||||||
m_italic->IsChecked() ) );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Currently, eeschema uses only the text width as text size,
|
// Currently, eeschema uses only the text width as text size,
|
||||||
|
@ -22,9 +22,7 @@
|
|||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef DIALOG_SHEET_PIN_PROPERTIES_H
|
#pragma once
|
||||||
#define DIALOG_SHEET_PIN_PROPERTIES_H
|
|
||||||
|
|
||||||
|
|
||||||
#include <dialog_sheet_pin_properties_base.h>
|
#include <dialog_sheet_pin_properties_base.h>
|
||||||
#include <widgets/unit_binder.h>
|
#include <widgets/unit_binder.h>
|
||||||
@ -55,5 +53,3 @@ private:
|
|||||||
|
|
||||||
HTML_MESSAGE_BOX* m_helpWindow;
|
HTML_MESSAGE_BOX* m_helpWindow;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // DIALOG_SHEET_PIN_PROPERTIES_H
|
|
||||||
|
@ -107,17 +107,15 @@ DIALOG_SHEET_PROPERTIES::DIALOG_SHEET_PROPERTIES( SCH_EDIT_FRAME* aParent, SCH_S
|
|||||||
// wxFormBuilder doesn't include this event...
|
// wxFormBuilder doesn't include this event...
|
||||||
m_grid->Connect( wxEVT_GRID_CELL_CHANGING, wxGridEventHandler( DIALOG_SHEET_PROPERTIES::OnGridCellChanging ),
|
m_grid->Connect( wxEVT_GRID_CELL_CHANGING, wxGridEventHandler( DIALOG_SHEET_PROPERTIES::OnGridCellChanging ),
|
||||||
nullptr, this );
|
nullptr, this );
|
||||||
|
|
||||||
|
finishDialogSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
DIALOG_SHEET_PROPERTIES::~DIALOG_SHEET_PROPERTIES()
|
DIALOG_SHEET_PROPERTIES::~DIALOG_SHEET_PROPERTIES()
|
||||||
{
|
{
|
||||||
if( EESCHEMA_SETTINGS* cfg = dynamic_cast<EESCHEMA_SETTINGS*>( Kiface().KifaceSettings() ) )
|
if( EESCHEMA_SETTINGS* cfg = dynamic_cast<EESCHEMA_SETTINGS*>( Kiface().KifaceSettings() ) )
|
||||||
{
|
|
||||||
cfg->m_Appearance.edit_sheet_visible_columns = m_grid->GetShownColumnsAsString();
|
cfg->m_Appearance.edit_sheet_visible_columns = m_grid->GetShownColumnsAsString();
|
||||||
cfg->m_Appearance.edit_sheet_width = GetSize().x;
|
|
||||||
cfg->m_Appearance.edit_sheet_height = GetSize().y;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Prevents crash bug in wxGrid's d'tor
|
// Prevents crash bug in wxGrid's d'tor
|
||||||
m_grid->DestroyTable( m_fields );
|
m_grid->DestroyTable( m_fields );
|
||||||
@ -314,14 +312,12 @@ bool DIALOG_SHEET_PROPERTIES::TransferDataFromWindow()
|
|||||||
|
|
||||||
if( fn.IsAbsolute() && fn.MakeRelativeTo( screenFileName.GetPath() ) )
|
if( fn.IsAbsolute() && fn.MakeRelativeTo( screenFileName.GetPath() ) )
|
||||||
{
|
{
|
||||||
wxMessageDialog makeRelDlg( this, _( "Use relative path for sheet file?" ),
|
wxMessageDialog makeRelDlg( this, _( "Use relative path for sheet file?" ), _( "Sheet File Path" ),
|
||||||
_( "Sheet File Path" ),
|
|
||||||
wxYES_NO | wxYES_DEFAULT | wxICON_QUESTION | wxCENTER );
|
wxYES_NO | wxYES_DEFAULT | wxICON_QUESTION | wxCENTER );
|
||||||
|
|
||||||
makeRelDlg.SetExtendedMessage( _( "Using relative hierarchical sheet file name paths "
|
makeRelDlg.SetExtendedMessage( _( "Using relative hierarchical sheet file name paths improves "
|
||||||
"improves schematic portability across systems and "
|
"schematic portability across systems and platforms. Using "
|
||||||
"platforms. Using absolute paths can result in "
|
"absolute paths can result in portability issues." ) );
|
||||||
"portability issues." ) );
|
|
||||||
makeRelDlg.SetYesNoLabels( wxMessageDialog::ButtonLabel( _( "Use Relative Path" ) ),
|
makeRelDlg.SetYesNoLabels( wxMessageDialog::ButtonLabel( _( "Use Relative Path" ) ),
|
||||||
wxMessageDialog::ButtonLabel( _( "Use Absolute Path" ) ) );
|
wxMessageDialog::ButtonLabel( _( "Use Absolute Path" ) ) );
|
||||||
|
|
||||||
@ -516,7 +512,8 @@ bool DIALOG_SHEET_PROPERTIES::onSheetFilenameChanged( const wxString& aNewFilena
|
|||||||
if( !wxCopyFile( *m_sourceSheetFilename, newAbsoluteFilename, false ) )
|
if( !wxCopyFile( *m_sourceSheetFilename, newAbsoluteFilename, false ) )
|
||||||
{
|
{
|
||||||
msg.Printf( _( "Failed to copy schematic file '%s' to destination '%s'." ),
|
msg.Printf( _( "Failed to copy schematic file '%s' to destination '%s'." ),
|
||||||
currentScreenFileName.GetFullPath(), newAbsoluteFilename );
|
currentScreenFileName.GetFullPath(),
|
||||||
|
newAbsoluteFilename );
|
||||||
|
|
||||||
DisplayError( m_frame, msg );
|
DisplayError( m_frame, msg );
|
||||||
|
|
||||||
@ -575,8 +572,7 @@ bool DIALOG_SHEET_PROPERTIES::onSheetFilenameChanged( const wxString& aNewFilena
|
|||||||
{
|
{
|
||||||
if( m_sheet->GetScreenCount() > 1 )
|
if( m_sheet->GetScreenCount() > 1 )
|
||||||
{
|
{
|
||||||
if( !IsOK( this, wxString::Format( _( "Create new file '%s' with contents "
|
if( !IsOK( this, wxString::Format( _( "Create new file '%s' with contents of '%s'?" ),
|
||||||
"of '%s'?" ),
|
|
||||||
sheetFileName.GetFullName(),
|
sheetFileName.GetFullName(),
|
||||||
m_sheet->GetFileName() )
|
m_sheet->GetFileName() )
|
||||||
+ wxT( "\n\n" )
|
+ wxT( "\n\n" )
|
||||||
@ -869,7 +865,6 @@ void DIALOG_SHEET_PROPERTIES::OnSizeGrid( wxSizeEvent& event )
|
|||||||
if( m_size != new_size )
|
if( m_size != new_size )
|
||||||
{
|
{
|
||||||
m_size = new_size;
|
m_size = new_size;
|
||||||
|
|
||||||
AdjustGridColumns();
|
AdjustGridColumns();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -877,17 +872,3 @@ void DIALOG_SHEET_PROPERTIES::OnSizeGrid( wxSizeEvent& event )
|
|||||||
event.Skip();
|
event.Skip();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void DIALOG_SHEET_PROPERTIES::OnInitDlg( wxInitDialogEvent& event )
|
|
||||||
{
|
|
||||||
TransferDataToWindow();
|
|
||||||
|
|
||||||
// Now all widgets have the size fixed, call FinishDialogSettings
|
|
||||||
finishDialogSettings();
|
|
||||||
|
|
||||||
EESCHEMA_SETTINGS* cfg = dynamic_cast<EESCHEMA_SETTINGS*>( Kiface().KifaceSettings() );
|
|
||||||
|
|
||||||
if( cfg && cfg->m_Appearance.edit_sheet_width > 0 && cfg->m_Appearance.edit_sheet_height > 0 )
|
|
||||||
SetSize( cfg->m_Appearance.edit_sheet_width, cfg->m_Appearance.edit_sheet_height );
|
|
||||||
|
|
||||||
}
|
|
||||||
|
@ -22,8 +22,7 @@
|
|||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef DIALOG_SHEET_PROPERTIES_H
|
#pragma once
|
||||||
#define DIALOG_SHEET_PROPERTIES_H
|
|
||||||
|
|
||||||
#include <fields_grid_table.h>
|
#include <fields_grid_table.h>
|
||||||
#include <widgets/unit_binder.h>
|
#include <widgets/unit_binder.h>
|
||||||
@ -59,7 +58,6 @@ private:
|
|||||||
void OnSizeGrid( wxSizeEvent& event ) override;
|
void OnSizeGrid( wxSizeEvent& event ) override;
|
||||||
void OnGridCellChanging( wxGridEvent& event );
|
void OnGridCellChanging( wxGridEvent& event );
|
||||||
void OnUpdateUI( wxUpdateUIEvent& event ) override;
|
void OnUpdateUI( wxUpdateUIEvent& event ) override;
|
||||||
void OnInitDlg( wxInitDialogEvent& event ) override;
|
|
||||||
|
|
||||||
void AdjustGridColumns();
|
void AdjustGridColumns();
|
||||||
|
|
||||||
@ -82,5 +80,3 @@ private:
|
|||||||
SCH_SHEET m_dummySheet;
|
SCH_SHEET m_dummySheet;
|
||||||
SCH_FIELD m_dummySheetNameField;
|
SCH_FIELD m_dummySheetNameField;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // DIALOG_SHEET_PROPERTIES_H
|
|
||||||
|
@ -30,6 +30,8 @@ DIALOG_SIM_FORMAT_VALUE::DIALOG_SIM_FORMAT_VALUE( wxWindow* aParent, SPICE_VALUE
|
|||||||
DIALOG_SIM_FORMAT_VALUE_BASE( aParent ),
|
DIALOG_SIM_FORMAT_VALUE_BASE( aParent ),
|
||||||
m_format( aFormat )
|
m_format( aFormat )
|
||||||
{
|
{
|
||||||
|
OptOut( this );
|
||||||
|
|
||||||
if( aFormat->Range.EndsWith( wxS( "V" ) ) )
|
if( aFormat->Range.EndsWith( wxS( "V" ) ) )
|
||||||
{
|
{
|
||||||
m_units = aFormat->Range.Right( 1 );
|
m_units = aFormat->Range.Right( 1 );
|
||||||
|
@ -21,8 +21,7 @@
|
|||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef DIALOG_SIM_FORMAT_VALUE_H
|
#pragma once
|
||||||
#define DIALOG_SIM_FORMAT_VALUE_H
|
|
||||||
|
|
||||||
#include <dialog_sim_format_value_base.h>
|
#include <dialog_sim_format_value_base.h>
|
||||||
|
|
||||||
@ -40,5 +39,3 @@ private:
|
|||||||
SPICE_VALUE_FORMAT* m_format;
|
SPICE_VALUE_FORMAT* m_format;
|
||||||
wxString m_units;
|
wxString m_units;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* DIALOG_SIM_FORMAT_VALUE_H */
|
|
||||||
|
@ -80,12 +80,6 @@ DIALOG_SYMBOL_CHOOSER::DIALOG_SYMBOL_CHOOSER( SCH_BASE_FRAME* aParent, const LIB
|
|||||||
m_useUnits = new wxCheckBox( this, wxID_ANY, _( "Place all units" ) );
|
m_useUnits = new wxCheckBox( this, wxID_ANY, _( "Place all units" ) );
|
||||||
m_useUnits->SetToolTip( _( "Sequentially place all units of the symbol." ) );
|
m_useUnits->SetToolTip( _( "Sequentially place all units of the symbol." ) );
|
||||||
|
|
||||||
if( EESCHEMA_SETTINGS* cfg = dynamic_cast<EESCHEMA_SETTINGS*>( Kiface().KifaceSettings() ) )
|
|
||||||
{
|
|
||||||
m_keepSymbol->SetValue( cfg->m_SymChooserPanel.keep_symbol );
|
|
||||||
m_useUnits->SetValue( cfg->m_SymChooserPanel.place_all_units );
|
|
||||||
}
|
|
||||||
|
|
||||||
buttonsSizer->Add( m_keepSymbol, 0, wxLEFT | wxALIGN_CENTER_VERTICAL, 5 );
|
buttonsSizer->Add( m_keepSymbol, 0, wxLEFT | wxALIGN_CENTER_VERTICAL, 5 );
|
||||||
buttonsSizer->Add( m_useUnits, 0, wxLEFT | wxALIGN_CENTER_VERTICAL, 30 );
|
buttonsSizer->Add( m_useUnits, 0, wxLEFT | wxALIGN_CENTER_VERTICAL, 30 );
|
||||||
|
|
||||||
@ -114,12 +108,6 @@ DIALOG_SYMBOL_CHOOSER::DIALOG_SYMBOL_CHOOSER( SCH_BASE_FRAME* aParent, const LIB
|
|||||||
|
|
||||||
DIALOG_SYMBOL_CHOOSER::~DIALOG_SYMBOL_CHOOSER()
|
DIALOG_SYMBOL_CHOOSER::~DIALOG_SYMBOL_CHOOSER()
|
||||||
{
|
{
|
||||||
if( EESCHEMA_SETTINGS* cfg = dynamic_cast<EESCHEMA_SETTINGS*>( Kiface().KifaceSettings() ) )
|
|
||||||
{
|
|
||||||
cfg->m_SymChooserPanel.keep_symbol = m_keepSymbol->GetValue();
|
|
||||||
cfg->m_SymChooserPanel.place_all_units = m_useUnits->GetValue();
|
|
||||||
}
|
|
||||||
|
|
||||||
Unbind( wxEVT_CHAR_HOOK, &PANEL_SYMBOL_CHOOSER::OnChar, m_chooserPanel );
|
Unbind( wxEVT_CHAR_HOOK, &PANEL_SYMBOL_CHOOSER::OnChar, m_chooserPanel );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -77,6 +77,9 @@ public:
|
|||||||
*/
|
*/
|
||||||
std::vector<std::pair<FIELD_T, wxString>> GetFields() const;
|
std::vector<std::pair<FIELD_T, wxString>> GetFields() const;
|
||||||
|
|
||||||
|
bool GetKeepSymbol() { return m_keepSymbol; }
|
||||||
|
bool GetPlaceAllUnits() { return m_useUnits; }
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static std::mutex g_Mutex;
|
static std::mutex g_Mutex;
|
||||||
|
|
||||||
|
@ -68,15 +68,6 @@ DIALOG_USER_DEFINED_SIGNALS::~DIALOG_USER_DEFINED_SIGNALS()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool DIALOG_USER_DEFINED_SIGNALS::TransferDataToWindow()
|
|
||||||
{
|
|
||||||
if( !wxDialog::TransferDataToWindow() )
|
|
||||||
return false;
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void DIALOG_USER_DEFINED_SIGNALS::addGridRow( const wxString& aText, int aId )
|
void DIALOG_USER_DEFINED_SIGNALS::addGridRow( const wxString& aText, int aId )
|
||||||
{
|
{
|
||||||
int row = m_grid->GetNumberRows();
|
int row = m_grid->GetNumberRows();
|
||||||
@ -127,8 +118,7 @@ void DIALOG_USER_DEFINED_SIGNALS::onDeleteSignal( wxCommandEvent& event )
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void DIALOG_USER_DEFINED_SIGNALS::onScintillaCharAdded( wxStyledTextEvent &aEvent,
|
void DIALOG_USER_DEFINED_SIGNALS::onScintillaCharAdded( wxStyledTextEvent &aEvent, SCINTILLA_TRICKS* aTricks )
|
||||||
SCINTILLA_TRICKS* aTricks )
|
|
||||||
{
|
{
|
||||||
wxStyledTextCtrl* textCtrl = aTricks->Scintilla();
|
wxStyledTextCtrl* textCtrl = aTricks->Scintilla();
|
||||||
wxArrayString tokens;
|
wxArrayString tokens;
|
||||||
|
@ -21,8 +21,7 @@
|
|||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef DIALOG_USER_DEFINED_SIGNALS_H
|
#pragma once
|
||||||
#define DIALOG_USER_DEFINED_SIGNALS_H
|
|
||||||
|
|
||||||
#include <dialog_user_defined_signals_base.h>
|
#include <dialog_user_defined_signals_base.h>
|
||||||
|
|
||||||
@ -46,7 +45,6 @@ private:
|
|||||||
void onScintillaCharAdded( wxStyledTextEvent &aEvent, SCINTILLA_TRICKS* aTricks );
|
void onScintillaCharAdded( wxStyledTextEvent &aEvent, SCINTILLA_TRICKS* aTricks );
|
||||||
void OnFormattingHelp( wxHyperlinkEvent& aEvent ) override;
|
void OnFormattingHelp( wxHyperlinkEvent& aEvent ) override;
|
||||||
|
|
||||||
bool TransferDataToWindow() override;
|
|
||||||
bool TransferDataFromWindow() override;
|
bool TransferDataFromWindow() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@ -55,7 +53,3 @@ private:
|
|||||||
|
|
||||||
HTML_MESSAGE_BOX* m_helpWindow;
|
HTML_MESSAGE_BOX* m_helpWindow;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endif // DIALOG_USER_DEFINED_SIGNALS_H
|
|
||||||
|
@ -180,12 +180,6 @@ EESCHEMA_SETTINGS::EESCHEMA_SETTINGS() :
|
|||||||
m_params.emplace_back( new PARAM<wxString>( "appearance.edit_sheet_visible_columns",
|
m_params.emplace_back( new PARAM<wxString>( "appearance.edit_sheet_visible_columns",
|
||||||
&m_Appearance.edit_sheet_visible_columns, "0 1 2 3 4 5 6 7" ) );
|
&m_Appearance.edit_sheet_visible_columns, "0 1 2 3 4 5 6 7" ) );
|
||||||
|
|
||||||
m_params.emplace_back( new PARAM<int>( "appearance.edit_sheet_width",
|
|
||||||
&m_Appearance.edit_sheet_width, -1 ) );
|
|
||||||
|
|
||||||
m_params.emplace_back( new PARAM<int>( "appearance.edit_sheet_height",
|
|
||||||
&m_Appearance.edit_sheet_height, -1 ) );
|
|
||||||
|
|
||||||
m_params.emplace_back( new PARAM<wxString>( "appearance.edit_label_visible_columns",
|
m_params.emplace_back( new PARAM<wxString>( "appearance.edit_label_visible_columns",
|
||||||
&m_Appearance.edit_label_visible_columns, "0 1 2 3 4 5 6 7" ) );
|
&m_Appearance.edit_label_visible_columns, "0 1 2 3 4 5 6 7" ) );
|
||||||
|
|
||||||
@ -599,12 +593,6 @@ EESCHEMA_SETTINGS::EESCHEMA_SETTINGS() :
|
|||||||
m_params.emplace_back( new PARAM<int>( "symbol_chooser.sort_mode",
|
m_params.emplace_back( new PARAM<int>( "symbol_chooser.sort_mode",
|
||||||
&m_SymChooserPanel.sort_mode, 0 ) );
|
&m_SymChooserPanel.sort_mode, 0 ) );
|
||||||
|
|
||||||
m_params.emplace_back( new PARAM<bool>( "symbol_chooser.keep_symbol",
|
|
||||||
&m_SymChooserPanel.keep_symbol, false ) );
|
|
||||||
|
|
||||||
m_params.emplace_back( new PARAM<bool>( "symbol_chooser.place_all_units",
|
|
||||||
&m_SymChooserPanel.place_all_units, true ) );
|
|
||||||
|
|
||||||
m_params.emplace_back( new PARAM<bool>( "import_graphics.interactive_placement",
|
m_params.emplace_back( new PARAM<bool>( "import_graphics.interactive_placement",
|
||||||
&m_ImportGraphics.interactive_placement, true ) );
|
&m_ImportGraphics.interactive_placement, true ) );
|
||||||
|
|
||||||
@ -855,8 +843,6 @@ bool EESCHEMA_SETTINGS::MigrateFromLegacy( wxConfigBase* aCfg )
|
|||||||
ret &= fromLegacy<int>( aCfg, "SymbolChooserVSashPosition", "symbol_chooser.sash_pos_v" );
|
ret &= fromLegacy<int>( aCfg, "SymbolChooserVSashPosition", "symbol_chooser.sash_pos_v" );
|
||||||
ret &= fromLegacy<int>( aCfg, "SymbolChooserWidth", "symbol_chooser.width" );
|
ret &= fromLegacy<int>( aCfg, "SymbolChooserWidth", "symbol_chooser.width" );
|
||||||
ret &= fromLegacy<int>( aCfg, "SymbolChooserHeight", "symbol_chooser.height" );
|
ret &= fromLegacy<int>( aCfg, "SymbolChooserHeight", "symbol_chooser.height" );
|
||||||
ret &= fromLegacy<bool>( aCfg, "SymbolChooserKeepSymbol", "symbol_chooser.keep_symbol" );
|
|
||||||
ret &= fromLegacy<bool>( aCfg, "SymbolChooserUseUnits", "symbol_chooser.place_all_units" );
|
|
||||||
|
|
||||||
const std::string vlf = "ViewlibFrame";
|
const std::string vlf = "ViewlibFrame";
|
||||||
ret &= fromLegacy<bool>( aCfg, vlf + "Maximized", "lib_view.window.maximized" );
|
ret &= fromLegacy<bool>( aCfg, vlf + "Maximized", "lib_view.window.maximized" );
|
||||||
|
@ -21,8 +21,7 @@
|
|||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _EESCHEMA_SETTINGS_H
|
#pragma once
|
||||||
#define _EESCHEMA_SETTINGS_H
|
|
||||||
|
|
||||||
#include <wx/aui/framemanager.h>
|
#include <wx/aui/framemanager.h>
|
||||||
|
|
||||||
@ -65,8 +64,6 @@ public:
|
|||||||
int edit_symbol_width;
|
int edit_symbol_width;
|
||||||
int edit_symbol_height;
|
int edit_symbol_height;
|
||||||
wxString edit_sheet_visible_columns;
|
wxString edit_sheet_visible_columns;
|
||||||
int edit_sheet_width;
|
|
||||||
int edit_sheet_height;
|
|
||||||
wxString edit_label_visible_columns;
|
wxString edit_label_visible_columns;
|
||||||
int edit_label_width;
|
int edit_label_width;
|
||||||
int edit_label_height;
|
int edit_label_height;
|
||||||
@ -267,8 +264,6 @@ public:
|
|||||||
int width;
|
int width;
|
||||||
int height;
|
int height;
|
||||||
int sort_mode;
|
int sort_mode;
|
||||||
bool keep_symbol;
|
|
||||||
bool place_all_units;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct DIALOG_IMPORT_GRAPHICS
|
struct DIALOG_IMPORT_GRAPHICS
|
||||||
@ -371,5 +366,3 @@ public:
|
|||||||
wxString m_lastSymbolLibDir;
|
wxString m_lastSymbolLibDir;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
@ -90,6 +90,8 @@ PICKED_SYMBOL SCH_BASE_FRAME::PickSymbolFromLibrary( const SYMBOL_LIBRARY_FILTER
|
|||||||
aHistoryList.insert( aHistoryList.begin(), sel );
|
aHistoryList.insert( aHistoryList.begin(), sel );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sel.KeepSymbol = dlg.GetKeepSymbol();
|
||||||
|
sel.PlaceAllUnits = dlg.GetPlaceAllUnits();
|
||||||
return sel;
|
return sel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -81,11 +81,16 @@ struct PICKED_SYMBOL
|
|||||||
int Unit;
|
int Unit;
|
||||||
int Convert;
|
int Convert;
|
||||||
|
|
||||||
|
bool KeepSymbol;
|
||||||
|
bool PlaceAllUnits;
|
||||||
|
|
||||||
std::vector<std::pair<FIELD_T, wxString>> Fields;
|
std::vector<std::pair<FIELD_T, wxString>> Fields;
|
||||||
|
|
||||||
PICKED_SYMBOL() :
|
PICKED_SYMBOL() :
|
||||||
Unit( 1 ),
|
Unit( 1 ),
|
||||||
Convert( 1 )
|
Convert( 1 ),
|
||||||
|
KeepSymbol( false ),
|
||||||
|
PlaceAllUnits( false )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -135,9 +135,9 @@ int SCH_DRAWING_TOOLS::PlaceSymbol( const TOOL_EVENT& aEvent )
|
|||||||
const SCH_ACTIONS::PLACE_SYMBOL_PARAMS& toolParams = aEvent.Parameter<SCH_ACTIONS::PLACE_SYMBOL_PARAMS>();
|
const SCH_ACTIONS::PLACE_SYMBOL_PARAMS& toolParams = aEvent.Parameter<SCH_ACTIONS::PLACE_SYMBOL_PARAMS>();
|
||||||
|
|
||||||
SCH_SYMBOL* symbol = toolParams.m_Symbol;
|
SCH_SYMBOL* symbol = toolParams.m_Symbol;
|
||||||
// If we get an parameterised symbol, we probably just want to place
|
|
||||||
// that and get out of the placmeent tool, rather than popping the
|
// If we get a parameterised symbol, we probably just want to place that and get out of the placmeent tool,
|
||||||
// chooser afterwards
|
// rather than popping up the chooser afterwards
|
||||||
bool placeOneOnly = symbol != nullptr;
|
bool placeOneOnly = symbol != nullptr;
|
||||||
|
|
||||||
SYMBOL_LIBRARY_FILTER filter;
|
SYMBOL_LIBRARY_FILTER filter;
|
||||||
@ -146,6 +146,8 @@ int SCH_DRAWING_TOOLS::PlaceSymbol( const TOOL_EVENT& aEvent )
|
|||||||
COMMON_SETTINGS* common_settings = Pgm().GetCommonSettings();
|
COMMON_SETTINGS* common_settings = Pgm().GetCommonSettings();
|
||||||
SCHEMATIC_SETTINGS& schSettings = m_frame->Schematic().Settings();
|
SCHEMATIC_SETTINGS& schSettings = m_frame->Schematic().Settings();
|
||||||
SCH_SCREEN* screen = m_frame->GetScreen();
|
SCH_SCREEN* screen = m_frame->GetScreen();
|
||||||
|
bool keepSymbol = false;
|
||||||
|
bool placeAllUnits = false;
|
||||||
|
|
||||||
if( m_inDrawingTool )
|
if( m_inDrawingTool )
|
||||||
return 0;
|
return 0;
|
||||||
@ -156,15 +158,12 @@ int SCH_DRAWING_TOOLS::PlaceSymbol( const TOOL_EVENT& aEvent )
|
|||||||
EE_GRID_HELPER grid( m_toolMgr );
|
EE_GRID_HELPER grid( m_toolMgr );
|
||||||
VECTOR2I cursorPos;
|
VECTOR2I cursorPos;
|
||||||
|
|
||||||
// First we need to get all instances of this sheet so we can annotate
|
// First we need to get all instances of this sheet so we can annotate whatever symbols we place on all copies
|
||||||
// whatever symbols we place on all copies
|
|
||||||
SCH_SHEET_LIST hierarchy = m_frame->Schematic().Hierarchy();
|
SCH_SHEET_LIST hierarchy = m_frame->Schematic().Hierarchy();
|
||||||
SCH_SHEET_LIST newInstances =
|
SCH_SHEET_LIST newInstances = hierarchy.FindAllSheetsForScreen( m_frame->GetCurrentSheet().LastScreen() );
|
||||||
hierarchy.FindAllSheetsForScreen( m_frame->GetCurrentSheet().LastScreen() );
|
|
||||||
newInstances.SortByPageNumbers();
|
newInstances.SortByPageNumbers();
|
||||||
|
|
||||||
// Get a list of all references in the schematic to avoid duplicates wherever
|
// Get a list of all references in the schematic to avoid duplicates wherever they're placed
|
||||||
// they're placed
|
|
||||||
SCH_REFERENCE_LIST existingRefs;
|
SCH_REFERENCE_LIST existingRefs;
|
||||||
hierarchy.GetSymbols( existingRefs );
|
hierarchy.GetSymbols( existingRefs );
|
||||||
existingRefs.SortByReferenceOnly();
|
existingRefs.SortByReferenceOnly();
|
||||||
@ -204,8 +203,7 @@ int SCH_DRAWING_TOOLS::PlaceSymbol( const TOOL_EVENT& aEvent )
|
|||||||
auto setCursor =
|
auto setCursor =
|
||||||
[&]()
|
[&]()
|
||||||
{
|
{
|
||||||
m_frame->GetCanvas()->SetCurrentCursor( symbol ? KICURSOR::MOVING
|
m_frame->GetCanvas()->SetCurrentCursor( symbol ? KICURSOR::MOVING : KICURSOR::COMPONENT );
|
||||||
: KICURSOR::COMPONENT );
|
|
||||||
};
|
};
|
||||||
|
|
||||||
auto cleanup =
|
auto cleanup =
|
||||||
@ -238,8 +236,8 @@ int SCH_DRAWING_TOOLS::PlaceSymbol( const TOOL_EVENT& aEvent )
|
|||||||
{
|
{
|
||||||
refs.ReannotateByOptions( (ANNOTATE_ORDER_T) cfg->m_AnnotatePanel.sort_order,
|
refs.ReannotateByOptions( (ANNOTATE_ORDER_T) cfg->m_AnnotatePanel.sort_order,
|
||||||
(ANNOTATE_ALGO_T) cfg->m_AnnotatePanel.method,
|
(ANNOTATE_ALGO_T) cfg->m_AnnotatePanel.method,
|
||||||
schSettings.m_AnnotateStartNum,
|
schSettings.m_AnnotateStartNum, existingRefs, false,
|
||||||
existingRefs, false, &hierarchy );
|
&hierarchy );
|
||||||
|
|
||||||
refs.UpdateAnnotation();
|
refs.UpdateAnnotation();
|
||||||
|
|
||||||
@ -368,12 +366,13 @@ int SCH_DRAWING_TOOLS::PlaceSymbol( const TOOL_EVENT& aEvent )
|
|||||||
|
|
||||||
// Pick the symbol to be placed
|
// Pick the symbol to be placed
|
||||||
bool footprintPreviews = m_frame->eeconfig()->m_Appearance.footprint_preview;
|
bool footprintPreviews = m_frame->eeconfig()->m_Appearance.footprint_preview;
|
||||||
PICKED_SYMBOL sel = m_frame->PickSymbolFromLibrary( &filter, *historyList,
|
PICKED_SYMBOL sel = m_frame->PickSymbolFromLibrary( &filter, *historyList, alreadyPlaced,
|
||||||
alreadyPlaced,
|
|
||||||
footprintPreviews );
|
footprintPreviews );
|
||||||
|
|
||||||
LIB_SYMBOL* libSymbol = sel.LibId.IsValid() ? m_frame->GetLibSymbol( sel.LibId )
|
keepSymbol = sel.KeepSymbol;
|
||||||
: nullptr;
|
placeAllUnits = sel.PlaceAllUnits;
|
||||||
|
|
||||||
|
LIB_SYMBOL* libSymbol = sel.LibId.IsValid() ? m_frame->GetLibSymbol( sel.LibId ) : nullptr;
|
||||||
|
|
||||||
if( !libSymbol )
|
if( !libSymbol )
|
||||||
continue;
|
continue;
|
||||||
@ -469,13 +468,12 @@ int SCH_DRAWING_TOOLS::PlaceSymbol( const TOOL_EVENT& aEvent )
|
|||||||
|
|
||||||
SCH_SYMBOL* nextSymbol = nullptr;
|
SCH_SYMBOL* nextSymbol = nullptr;
|
||||||
|
|
||||||
if( m_frame->eeconfig()->m_SymChooserPanel.place_all_units
|
if( keepSymbol || placeAllUnits )
|
||||||
|| m_frame->eeconfig()->m_SymChooserPanel.keep_symbol )
|
|
||||||
{
|
{
|
||||||
SCH_REFERENCE currentReference( symbol, m_frame->GetCurrentSheet() );
|
SCH_REFERENCE currentReference( symbol, m_frame->GetCurrentSheet() );
|
||||||
SCHEMATIC& schematic = m_frame->Schematic();
|
SCHEMATIC& schematic = m_frame->Schematic();
|
||||||
|
|
||||||
if( m_frame->eeconfig()->m_SymChooserPanel.place_all_units )
|
if( placeAllUnits )
|
||||||
{
|
{
|
||||||
while( currentReference.GetUnit() <= symbol->GetUnitCount()
|
while( currentReference.GetUnit() <= symbol->GetUnitCount()
|
||||||
&& schematic.Contains( currentReference ) )
|
&& schematic.Contains( currentReference ) )
|
||||||
@ -490,8 +488,7 @@ int SCH_DRAWING_TOOLS::PlaceSymbol( const TOOL_EVENT& aEvent )
|
|||||||
}
|
}
|
||||||
|
|
||||||
// We are either stepping to the next unit or next symbol
|
// We are either stepping to the next unit or next symbol
|
||||||
if( m_frame->eeconfig()->m_SymChooserPanel.keep_symbol ||
|
if( keepSymbol || currentReference.GetUnit() > 1 )
|
||||||
currentReference.GetUnit() > 1 )
|
|
||||||
{
|
{
|
||||||
nextSymbol = static_cast<SCH_SYMBOL*>( symbol->Duplicate( IGNORE_PARENT_GROUP ) );
|
nextSymbol = static_cast<SCH_SYMBOL*>( symbol->Duplicate( IGNORE_PARENT_GROUP ) );
|
||||||
nextSymbol->SetUnit( currentReference.GetUnit() );
|
nextSymbol->SetUnit( currentReference.GetUnit() );
|
||||||
|
@ -50,13 +50,3 @@ bool DIALOG_UPDATE_CHECK_PROMPT::TransferDataFromWindow()
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool DIALOG_UPDATE_CHECK_PROMPT::TransferDataToWindow()
|
|
||||||
{
|
|
||||||
// Since this is a first time start dialog, just default to both checks true
|
|
||||||
m_cbPCMUpdates->SetValue( true );
|
|
||||||
m_cbKiCadUpdates->SetValue( true );
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
@ -22,8 +22,7 @@
|
|||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef DIALOG_UPDATE_CHECK_PROMPT_H
|
#pragma once
|
||||||
#define DIALOG_UPDATE_CHECK_PROMPT_H
|
|
||||||
|
|
||||||
#include <dialogs/dialog_update_check_prompt_base.h>
|
#include <dialogs/dialog_update_check_prompt_base.h>
|
||||||
|
|
||||||
@ -34,7 +33,4 @@ public:
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool TransferDataFromWindow() override;
|
bool TransferDataFromWindow() override;
|
||||||
bool TransferDataToWindow() override;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
|
@ -1,5 +1,5 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b3)
|
// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6)
|
||||||
// http://www.wxformbuilder.org/
|
// http://www.wxformbuilder.org/
|
||||||
//
|
//
|
||||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||||
@ -29,9 +29,11 @@ DIALOG_UPDATE_CHECK_PROMPT_BASE::DIALOG_UPDATE_CHECK_PROMPT_BASE( wxWindow* pare
|
|||||||
bSizer4->Add( m_messageLine1, 0, wxALL, 5 );
|
bSizer4->Add( m_messageLine1, 0, wxALL, 5 );
|
||||||
|
|
||||||
m_cbKiCadUpdates = new wxCheckBox( this, wxID_ANY, _("KiCad"), wxDefaultPosition, wxDefaultSize, 0 );
|
m_cbKiCadUpdates = new wxCheckBox( this, wxID_ANY, _("KiCad"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_cbKiCadUpdates->SetValue(true);
|
||||||
bSizer4->Add( m_cbKiCadUpdates, 0, wxALL, 5 );
|
bSizer4->Add( m_cbKiCadUpdates, 0, wxALL, 5 );
|
||||||
|
|
||||||
m_cbPCMUpdates = new wxCheckBox( this, wxID_ANY, _("Plugin and Content Manager"), wxDefaultPosition, wxDefaultSize, 0 );
|
m_cbPCMUpdates = new wxCheckBox( this, wxID_ANY, _("Plugin and Content Manager"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_cbPCMUpdates->SetValue(true);
|
||||||
bSizer4->Add( m_cbPCMUpdates, 0, wxALL, 5 );
|
bSizer4->Add( m_cbPCMUpdates, 0, wxALL, 5 );
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,41 +1,44 @@
|
|||||||
<?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="16" />
|
<FileVersion major="1" minor="18"/>
|
||||||
<object class="Project" expanded="1">
|
<object class="Project" expanded="true">
|
||||||
<property name="class_decoration"></property>
|
|
||||||
<property name="code_generation">C++</property>
|
<property name="code_generation">C++</property>
|
||||||
<property name="disconnect_events">1</property>
|
<property name="cpp_class_decoration"></property>
|
||||||
<property name="disconnect_mode">source_name</property>
|
<property name="cpp_disconnect_events">1</property>
|
||||||
<property name="disconnect_php_events">0</property>
|
<property name="cpp_event_generation">connect</property>
|
||||||
<property name="disconnect_python_events">0</property>
|
<property name="cpp_help_provider">none</property>
|
||||||
|
<property name="cpp_namespace"></property>
|
||||||
|
<property name="cpp_precompiled_header"></property>
|
||||||
|
<property name="cpp_use_array_enum">0</property>
|
||||||
|
<property name="cpp_use_enum">0</property>
|
||||||
<property name="embedded_files_path">res</property>
|
<property name="embedded_files_path">res</property>
|
||||||
<property name="encoding">UTF-8</property>
|
<property name="encoding">UTF-8</property>
|
||||||
<property name="event_generation">connect</property>
|
|
||||||
<property name="file">dialog_update_check_prompt_base</property>
|
<property name="file">dialog_update_check_prompt_base</property>
|
||||||
<property name="first_id">1000</property>
|
<property name="first_id">1000</property>
|
||||||
<property name="help_provider">none</property>
|
|
||||||
<property name="image_path_wrapper_function_name"></property>
|
|
||||||
<property name="indent_with_spaces"></property>
|
|
||||||
<property name="internationalize">1</property>
|
<property name="internationalize">1</property>
|
||||||
|
<property name="lua_skip_events">1</property>
|
||||||
|
<property name="lua_ui_table">UI</property>
|
||||||
<property name="name">dialog_update_check_prompt_base</property>
|
<property name="name">dialog_update_check_prompt_base</property>
|
||||||
<property name="namespace"></property>
|
|
||||||
<property name="path">.</property>
|
<property name="path">.</property>
|
||||||
<property name="precompiled_header"></property>
|
<property name="php_disconnect_events">0</property>
|
||||||
|
<property name="php_disconnect_mode">source_name</property>
|
||||||
|
<property name="php_skip_events">1</property>
|
||||||
|
<property name="python_disconnect_events">0</property>
|
||||||
|
<property name="python_disconnect_mode">source_name</property>
|
||||||
|
<property name="python_image_path_wrapper_function_name"></property>
|
||||||
|
<property name="python_indent_with_spaces"></property>
|
||||||
|
<property name="python_skip_events">1</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_python_events">1</property>
|
|
||||||
<property name="ui_table">UI</property>
|
|
||||||
<property name="use_array_enum">0</property>
|
|
||||||
<property name="use_enum">0</property>
|
|
||||||
<property name="use_microsoft_bom">0</property>
|
<property name="use_microsoft_bom">0</property>
|
||||||
<object class="Dialog" expanded="1">
|
<property name="use_native_eol">0</property>
|
||||||
|
<object class="Dialog" expanded="true">
|
||||||
<property name="aui_managed">0</property>
|
<property name="aui_managed">0</property>
|
||||||
<property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
|
<property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
|
||||||
<property name="bg"></property>
|
<property name="bg"></property>
|
||||||
<property name="center">wxBOTH</property>
|
<property name="center">wxBOTH</property>
|
||||||
<property name="context_help"></property>
|
<property name="context_help"></property>
|
||||||
<property name="context_menu">1</property>
|
<property name="context_menu">1</property>
|
||||||
|
<property name="drag_accept_files">0</property>
|
||||||
<property name="enabled">1</property>
|
<property name="enabled">1</property>
|
||||||
<property name="event_handler">impl_virtual</property>
|
<property name="event_handler">impl_virtual</property>
|
||||||
<property name="extra_style"></property>
|
<property name="extra_style"></property>
|
||||||
@ -56,16 +59,16 @@
|
|||||||
<property name="window_extra_style"></property>
|
<property name="window_extra_style"></property>
|
||||||
<property name="window_name"></property>
|
<property name="window_name"></property>
|
||||||
<property name="window_style"></property>
|
<property name="window_style"></property>
|
||||||
<object class="wxBoxSizer" expanded="1">
|
<object class="wxBoxSizer" expanded="true">
|
||||||
<property name="minimum_size"></property>
|
<property name="minimum_size"></property>
|
||||||
<property name="name">bSizerMain</property>
|
<property name="name">bSizerMain</property>
|
||||||
<property name="orient">wxVERTICAL</property>
|
<property name="orient">wxVERTICAL</property>
|
||||||
<property name="permission">none</property>
|
<property name="permission">none</property>
|
||||||
<object class="sizeritem" expanded="1">
|
<object class="sizeritem" expanded="true">
|
||||||
<property name="border">5</property>
|
<property name="border">5</property>
|
||||||
<property name="flag">wxEXPAND|wxALL</property>
|
<property name="flag">wxEXPAND|wxALL</property>
|
||||||
<property name="proportion">1</property>
|
<property name="proportion">1</property>
|
||||||
<object class="wxFlexGridSizer" expanded="1">
|
<object class="wxFlexGridSizer" expanded="true">
|
||||||
<property name="cols">2</property>
|
<property name="cols">2</property>
|
||||||
<property name="flexible_direction">wxBOTH</property>
|
<property name="flexible_direction">wxBOTH</property>
|
||||||
<property name="growablecols"></property>
|
<property name="growablecols"></property>
|
||||||
@ -77,28 +80,28 @@
|
|||||||
<property name="permission">none</property>
|
<property name="permission">none</property>
|
||||||
<property name="rows">0</property>
|
<property name="rows">0</property>
|
||||||
<property name="vgap">10</property>
|
<property name="vgap">10</property>
|
||||||
<object class="sizeritem" expanded="1">
|
<object class="sizeritem" expanded="true">
|
||||||
<property name="border">5</property>
|
<property name="border">5</property>
|
||||||
<property name="flag">wxEXPAND|wxRIGHT</property>
|
<property name="flag">wxEXPAND|wxRIGHT</property>
|
||||||
<property name="proportion">1</property>
|
<property name="proportion">1</property>
|
||||||
<object class="wxBoxSizer" expanded="1">
|
<object class="wxBoxSizer" expanded="true">
|
||||||
<property name="minimum_size"></property>
|
<property name="minimum_size"></property>
|
||||||
<property name="name">bSizer4</property>
|
<property name="name">bSizer4</property>
|
||||||
<property name="orient">wxVERTICAL</property>
|
<property name="orient">wxVERTICAL</property>
|
||||||
<property name="permission">none</property>
|
<property name="permission">none</property>
|
||||||
<object class="sizeritem" expanded="1">
|
<object class="sizeritem" expanded="true">
|
||||||
<property name="border">5</property>
|
<property name="border">5</property>
|
||||||
<property name="flag">wxALL</property>
|
<property name="flag">wxALL</property>
|
||||||
<property name="proportion">0</property>
|
<property name="proportion">0</property>
|
||||||
<object class="wxStaticText" expanded="1">
|
<object class="wxStaticText" expanded="true">
|
||||||
<property name="BottomDockable">1</property>
|
<property name="BottomDockable">1</property>
|
||||||
<property name="LeftDockable">1</property>
|
<property name="LeftDockable">1</property>
|
||||||
<property name="RightDockable">1</property>
|
<property name="RightDockable">1</property>
|
||||||
<property name="TopDockable">1</property>
|
<property name="TopDockable">1</property>
|
||||||
<property name="aui_layer"></property>
|
<property name="aui_layer">0</property>
|
||||||
<property name="aui_name"></property>
|
<property name="aui_name"></property>
|
||||||
<property name="aui_position"></property>
|
<property name="aui_position">0</property>
|
||||||
<property name="aui_row"></property>
|
<property name="aui_row">0</property>
|
||||||
<property name="best_size"></property>
|
<property name="best_size"></property>
|
||||||
<property name="bg"></property>
|
<property name="bg"></property>
|
||||||
<property name="caption"></property>
|
<property name="caption"></property>
|
||||||
@ -111,6 +114,7 @@
|
|||||||
<property name="dock">Dock</property>
|
<property name="dock">Dock</property>
|
||||||
<property name="dock_fixed">0</property>
|
<property name="dock_fixed">0</property>
|
||||||
<property name="docking">Left</property>
|
<property name="docking">Left</property>
|
||||||
|
<property name="drag_accept_files">0</property>
|
||||||
<property name="enabled">1</property>
|
<property name="enabled">1</property>
|
||||||
<property name="fg"></property>
|
<property name="fg"></property>
|
||||||
<property name="floatable">1</property>
|
<property name="floatable">1</property>
|
||||||
@ -147,25 +151,25 @@
|
|||||||
<property name="wrap">-1</property>
|
<property name="wrap">-1</property>
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
<object class="sizeritem" expanded="1">
|
<object class="sizeritem" expanded="true">
|
||||||
<property name="border">5</property>
|
<property name="border">5</property>
|
||||||
<property name="flag">wxALL</property>
|
<property name="flag">wxALL</property>
|
||||||
<property name="proportion">0</property>
|
<property name="proportion">0</property>
|
||||||
<object class="wxCheckBox" expanded="1">
|
<object class="wxCheckBox" expanded="true">
|
||||||
<property name="BottomDockable">1</property>
|
<property name="BottomDockable">1</property>
|
||||||
<property name="LeftDockable">1</property>
|
<property name="LeftDockable">1</property>
|
||||||
<property name="RightDockable">1</property>
|
<property name="RightDockable">1</property>
|
||||||
<property name="TopDockable">1</property>
|
<property name="TopDockable">1</property>
|
||||||
<property name="aui_layer"></property>
|
<property name="aui_layer">0</property>
|
||||||
<property name="aui_name"></property>
|
<property name="aui_name"></property>
|
||||||
<property name="aui_position"></property>
|
<property name="aui_position">0</property>
|
||||||
<property name="aui_row"></property>
|
<property name="aui_row">0</property>
|
||||||
<property name="best_size"></property>
|
<property name="best_size"></property>
|
||||||
<property name="bg"></property>
|
<property name="bg"></property>
|
||||||
<property name="caption"></property>
|
<property name="caption"></property>
|
||||||
<property name="caption_visible">1</property>
|
<property name="caption_visible">1</property>
|
||||||
<property name="center_pane">0</property>
|
<property name="center_pane">0</property>
|
||||||
<property name="checked">0</property>
|
<property name="checked">1</property>
|
||||||
<property name="close_button">1</property>
|
<property name="close_button">1</property>
|
||||||
<property name="context_help"></property>
|
<property name="context_help"></property>
|
||||||
<property name="context_menu">1</property>
|
<property name="context_menu">1</property>
|
||||||
@ -173,6 +177,7 @@
|
|||||||
<property name="dock">Dock</property>
|
<property name="dock">Dock</property>
|
||||||
<property name="dock_fixed">0</property>
|
<property name="dock_fixed">0</property>
|
||||||
<property name="docking">Left</property>
|
<property name="docking">Left</property>
|
||||||
|
<property name="drag_accept_files">0</property>
|
||||||
<property name="enabled">1</property>
|
<property name="enabled">1</property>
|
||||||
<property name="fg"></property>
|
<property name="fg"></property>
|
||||||
<property name="floatable">1</property>
|
<property name="floatable">1</property>
|
||||||
@ -211,25 +216,25 @@
|
|||||||
<property name="window_style"></property>
|
<property name="window_style"></property>
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
<object class="sizeritem" expanded="1">
|
<object class="sizeritem" expanded="true">
|
||||||
<property name="border">5</property>
|
<property name="border">5</property>
|
||||||
<property name="flag">wxALL</property>
|
<property name="flag">wxALL</property>
|
||||||
<property name="proportion">0</property>
|
<property name="proportion">0</property>
|
||||||
<object class="wxCheckBox" expanded="1">
|
<object class="wxCheckBox" expanded="true">
|
||||||
<property name="BottomDockable">1</property>
|
<property name="BottomDockable">1</property>
|
||||||
<property name="LeftDockable">1</property>
|
<property name="LeftDockable">1</property>
|
||||||
<property name="RightDockable">1</property>
|
<property name="RightDockable">1</property>
|
||||||
<property name="TopDockable">1</property>
|
<property name="TopDockable">1</property>
|
||||||
<property name="aui_layer"></property>
|
<property name="aui_layer">0</property>
|
||||||
<property name="aui_name"></property>
|
<property name="aui_name"></property>
|
||||||
<property name="aui_position"></property>
|
<property name="aui_position">0</property>
|
||||||
<property name="aui_row"></property>
|
<property name="aui_row">0</property>
|
||||||
<property name="best_size"></property>
|
<property name="best_size"></property>
|
||||||
<property name="bg"></property>
|
<property name="bg"></property>
|
||||||
<property name="caption"></property>
|
<property name="caption"></property>
|
||||||
<property name="caption_visible">1</property>
|
<property name="caption_visible">1</property>
|
||||||
<property name="center_pane">0</property>
|
<property name="center_pane">0</property>
|
||||||
<property name="checked">0</property>
|
<property name="checked">1</property>
|
||||||
<property name="close_button">1</property>
|
<property name="close_button">1</property>
|
||||||
<property name="context_help"></property>
|
<property name="context_help"></property>
|
||||||
<property name="context_menu">1</property>
|
<property name="context_menu">1</property>
|
||||||
@ -237,6 +242,7 @@
|
|||||||
<property name="dock">Dock</property>
|
<property name="dock">Dock</property>
|
||||||
<property name="dock_fixed">0</property>
|
<property name="dock_fixed">0</property>
|
||||||
<property name="docking">Left</property>
|
<property name="docking">Left</property>
|
||||||
|
<property name="drag_accept_files">0</property>
|
||||||
<property name="enabled">1</property>
|
<property name="enabled">1</property>
|
||||||
<property name="fg"></property>
|
<property name="fg"></property>
|
||||||
<property name="floatable">1</property>
|
<property name="floatable">1</property>
|
||||||
@ -277,21 +283,21 @@
|
|||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
<object class="sizeritem" expanded="1">
|
<object class="sizeritem" expanded="true">
|
||||||
<property name="border">5</property>
|
<property name="border">5</property>
|
||||||
<property name="flag">wxEXPAND</property>
|
<property name="flag">wxEXPAND</property>
|
||||||
<property name="proportion">1</property>
|
<property name="proportion">1</property>
|
||||||
<object class="spacer" expanded="1">
|
<object class="spacer" expanded="true">
|
||||||
<property name="height">0</property>
|
<property name="height">0</property>
|
||||||
<property name="permission">protected</property>
|
<property name="permission">protected</property>
|
||||||
<property name="width">0</property>
|
<property name="width">0</property>
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
<object class="sizeritem" expanded="1">
|
<object class="sizeritem" expanded="true">
|
||||||
<property name="border">5</property>
|
<property name="border">5</property>
|
||||||
<property name="flag">wxEXPAND</property>
|
<property name="flag">wxEXPAND</property>
|
||||||
<property name="proportion">1</property>
|
<property name="proportion">1</property>
|
||||||
<object class="wxStdDialogButtonSizer" expanded="1">
|
<object class="wxStdDialogButtonSizer" expanded="true">
|
||||||
<property name="Apply">0</property>
|
<property name="Apply">0</property>
|
||||||
<property name="Cancel">1</property>
|
<property name="Cancel">1</property>
|
||||||
<property name="ContextHelp">0</property>
|
<property name="ContextHelp">0</property>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b3)
|
// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6)
|
||||||
// http://www.wxformbuilder.org/
|
// http://www.wxformbuilder.org/
|
||||||
//
|
//
|
||||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||||
@ -24,7 +24,6 @@
|
|||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
/// Class DIALOG_UPDATE_CHECK_PROMPT_BASE
|
/// Class DIALOG_UPDATE_CHECK_PROMPT_BASE
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
Loading…
x
Reference in New Issue
Block a user