Do not allow sheet filename change from DIALOG_SCH_FIELD_PROPERTIES.
It does not work. Changing a sheet filename is complex, and can be made only in sheet properties dialog.
This commit is contained in:
parent
e955ee7bd2
commit
f11687c5e5
|
@ -315,6 +315,8 @@ DIALOG_SCH_FIELD_PROPERTIES::DIALOG_SCH_FIELD_PROPERTIES( SCH_BASE_FRAME* aParen
|
|||
DIALOG_FIELD_PROPERTIES( aParent, aTitle, aField ),
|
||||
m_field( aField )
|
||||
{
|
||||
m_isSheetFilename = false;
|
||||
|
||||
if( aField->GetParent() && aField->GetParent()->Type() == SCH_SYMBOL_T )
|
||||
{
|
||||
m_fieldId = aField->GetId();
|
||||
|
@ -323,9 +325,19 @@ DIALOG_SCH_FIELD_PROPERTIES::DIALOG_SCH_FIELD_PROPERTIES( SCH_BASE_FRAME* aParen
|
|||
{
|
||||
switch( aField->GetId() )
|
||||
{
|
||||
case SHEETNAME: m_fieldId = SHEETNAME_V; break;
|
||||
case SHEETFILENAME: m_fieldId = SHEETFILENAME_V; break;
|
||||
default: m_fieldId = SHEETUSERFIELD_V; break;
|
||||
case SHEETNAME:
|
||||
m_fieldId = SHEETNAME_V;
|
||||
break;
|
||||
|
||||
case SHEETFILENAME:
|
||||
m_isSheetFilename = true;
|
||||
m_fieldId = SHEETFILENAME_V;
|
||||
m_stSheetFnWarning->Show( true );
|
||||
break;
|
||||
|
||||
default:
|
||||
m_fieldId = SHEETUSERFIELD_V;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -353,6 +365,12 @@ DIALOG_SCH_FIELD_PROPERTIES::DIALOG_SCH_FIELD_PROPERTIES( SCH_BASE_FRAME* aParen
|
|||
&DIALOG_SCH_FIELD_PROPERTIES::onScintillaCharAdded, this );
|
||||
|
||||
init();
|
||||
|
||||
if( m_isSheetFilename )
|
||||
{
|
||||
m_StyledTextCtrl->Enable( false );
|
||||
m_TextCtrl->Enable( false );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -152,6 +152,7 @@ public:
|
|||
|
||||
private:
|
||||
const SCH_FIELD* m_field;
|
||||
bool m_isSheetFilename;
|
||||
};
|
||||
|
||||
#endif // DIALOG_EDIT_ONE_FIELD_H_
|
||||
|
|
|
@ -39,6 +39,7 @@ DIALOG_LIB_TEXT_PROPERTIES::DIALOG_LIB_TEXT_PROPERTIES( SYMBOL_EDIT_FRAME* aPare
|
|||
{
|
||||
m_parent = aParent;
|
||||
m_graphicText = aText;
|
||||
m_stSheetFnWarning->Show( false ); // Shown only for sheet filename
|
||||
|
||||
// Disable options for fieldedit, not existing in graphic text
|
||||
m_visible->Show( false );
|
||||
|
|
|
@ -16,6 +16,10 @@ DIALOG_LIB_TEXT_PROPERTIES_BASE::DIALOG_LIB_TEXT_PROPERTIES_BASE( wxWindow* pare
|
|||
wxBoxSizer* bMainSizer;
|
||||
bMainSizer = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
m_stSheetFnWarning = new wxStaticText( this, wxID_ANY, _("Warning: Sheet filename can be modified only in sheet properties dialog."), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_stSheetFnWarning->Wrap( -1 );
|
||||
bMainSizer->Add( m_stSheetFnWarning, 0, wxALL, 5 );
|
||||
|
||||
wxBoxSizer* bPropertiesSizer;
|
||||
bPropertiesSizer = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
|
|
|
@ -59,6 +59,67 @@
|
|||
<property name="name">bMainSizer</property>
|
||||
<property name="orient">wxVERTICAL</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Warning: Sheet filename can be modified only in sheet properties dialog.</property>
|
||||
<property name="markup">0</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_stSheetFnWarning</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass">; ; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxTOP|wxRIGHT|wxLEFT</property>
|
||||
|
|
|
@ -40,6 +40,7 @@ class DIALOG_LIB_TEXT_PROPERTIES_BASE : public DIALOG_SHIM
|
|||
private:
|
||||
|
||||
protected:
|
||||
wxStaticText* m_stSheetFnWarning;
|
||||
wxStaticText* m_textLabel;
|
||||
wxTextCtrl* m_TextCtrl;
|
||||
wxStyledTextCtrl* m_StyledTextCtrl;
|
||||
|
|
Loading…
Reference in New Issue