Don't suggest we're going to cancel already-added signals.

This commit is contained in:
Jeff Young 2022-12-23 12:39:57 +00:00
parent 3f49fa5361
commit 66eafc56bb
5 changed files with 14 additions and 7 deletions

View File

@ -109,7 +109,9 @@ bool DIALOG_SIGNAL_LIST::addSignalToPlotFrame( const wxString& aPlotName )
return false; return false;
} }
else else
{
return false; return false;
}
return true; return true;
} }
@ -117,7 +119,7 @@ bool DIALOG_SIGNAL_LIST::addSignalToPlotFrame( const wxString& aPlotName )
void DIALOG_SIGNAL_LIST::addSelectionToPlotFrame() void DIALOG_SIGNAL_LIST::addSelectionToPlotFrame()
{ {
for( unsigned int i = 0; i < m_signals->GetCount(); ++i ) for( int i = 0; i < (int) m_signals->GetCount(); ++i )
{ {
if( m_signals->IsSelected( i ) ) if( m_signals->IsSelected( i ) )
{ {

View File

@ -42,6 +42,7 @@ private:
void onSignalAdd( wxCommandEvent& event ) override void onSignalAdd( wxCommandEvent& event ) override
{ {
addSelectionToPlotFrame(); addSelectionToPlotFrame();
m_sdbSizerCancel->SetLabel( _( "Done" ) );
} }
void addSelectionToPlotFrame(); void addSelectionToPlotFrame();

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Oct 26 2018) // C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO *NOT* EDIT THIS FILE! // PLEASE DO *NOT* EDIT THIS FILE!

View File

@ -1,6 +1,6 @@
<?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="15" /> <FileVersion major="1" minor="16" />
<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>
@ -14,6 +14,7 @@
<property name="file">dialog_signal_list_base</property> <property name="file">dialog_signal_list_base</property>
<property name="first_id">1000</property> <property name="first_id">1000</property>
<property name="help_provider">none</property> <property name="help_provider">none</property>
<property name="image_path_wrapper_function_name"></property>
<property name="indent_with_spaces"></property> <property name="indent_with_spaces"></property>
<property name="internationalize">1</property> <property name="internationalize">1</property>
<property name="name">DIALOG_SIGNAL_LIST_BASE</property> <property name="name">DIALOG_SIGNAL_LIST_BASE</property>
@ -25,6 +26,7 @@
<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="ui_table">UI</property>
<property name="use_array_enum">0</property>
<property name="use_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"> <object class="Dialog" expanded="1">
@ -48,8 +50,9 @@
<property name="size">-1,-1</property> <property name="size">-1,-1</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"></property> <property name="title">Add Signals</property>
<property name="tooltip"></property> <property name="tooltip"></property>
<property name="two_step_creation">0</property>
<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>

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Oct 26 2018) // C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO *NOT* EDIT THIS FILE! // PLEASE DO *NOT* EDIT THIS FILE!
@ -41,13 +41,14 @@ class DIALOG_SIGNAL_LIST_BASE : public DIALOG_SHIM
wxButton* m_sdbSizerOK; wxButton* m_sdbSizerOK;
wxButton* m_sdbSizerCancel; wxButton* m_sdbSizerCancel;
// Virtual event handlers, overide them in your derived class // Virtual event handlers, override them in your derived class
virtual void onSignalAdd( wxCommandEvent& event ) { event.Skip(); } virtual void onSignalAdd( wxCommandEvent& event ) { event.Skip(); }
public: public:
DIALOG_SIGNAL_LIST_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); DIALOG_SIGNAL_LIST_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Add Signals"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_SIGNAL_LIST_BASE(); ~DIALOG_SIGNAL_LIST_BASE();
}; };