page layout editor: fix a crash on block move.
This crash was due to a pointer initialized to a temporary reference. Very minor coding style fixes
This commit is contained in:
parent
83d5a770e8
commit
2230abde1b
|
@ -177,7 +177,8 @@ wxString WS_DRAW_ITEM_LIST::BuildFullText( const wxString& aTextbase )
|
|||
break;
|
||||
|
||||
case 'Z':
|
||||
msg += *m_paperFormat;
|
||||
if( m_paperFormat )
|
||||
msg += *m_paperFormat;
|
||||
break;
|
||||
|
||||
case 'S':
|
||||
|
@ -196,11 +197,12 @@ wxString WS_DRAW_ITEM_LIST::BuildFullText( const wxString& aTextbase )
|
|||
break;
|
||||
|
||||
case 'L':
|
||||
msg += *m_sheetLayer;
|
||||
if( m_sheetLayer )
|
||||
msg += *m_sheetLayer;
|
||||
break;
|
||||
|
||||
case 'P':
|
||||
msg += *m_sheetFullName;
|
||||
msg += m_sheetFullName;
|
||||
break;
|
||||
|
||||
case 'Y':
|
||||
|
|
|
@ -388,7 +388,7 @@ protected:
|
|||
const TITLE_BLOCK* m_titleBlock; // for basic inscriptions
|
||||
const wxString* m_paperFormat; // for basic inscriptions
|
||||
wxString m_fileName; // for basic inscriptions
|
||||
const wxString* m_sheetFullName; // for basic inscriptions
|
||||
wxString m_sheetFullName; // for basic inscriptions
|
||||
const wxString* m_sheetLayer; // for basic inscriptions
|
||||
|
||||
|
||||
|
@ -400,10 +400,9 @@ public:
|
|||
m_penSize = 1;
|
||||
m_sheetNumber = 1;
|
||||
m_sheetCount = 1;
|
||||
m_sheetLayer = 0;
|
||||
m_titleBlock = NULL;
|
||||
m_paperFormat = NULL;
|
||||
m_sheetFullName = NULL;
|
||||
m_sheetLayer = nullptr;
|
||||
m_titleBlock = nullptr;
|
||||
m_paperFormat = nullptr;
|
||||
}
|
||||
|
||||
~WS_DRAW_ITEM_LIST()
|
||||
|
@ -416,7 +415,7 @@ public:
|
|||
* Set the filename to draw/plot
|
||||
* @param aFileName = the text to display by the "filename" format
|
||||
*/
|
||||
void SetFileName( const wxString & aFileName )
|
||||
void SetFileName( const wxString& aFileName )
|
||||
{
|
||||
m_fileName = aFileName;
|
||||
}
|
||||
|
@ -425,16 +424,16 @@ public:
|
|||
* Set the sheet name to draw/plot
|
||||
* @param aSheetName = the text to draw/plot by the "sheetname" format
|
||||
*/
|
||||
void SetSheetName( const wxString & aSheetName )
|
||||
void SetSheetName( const wxString& aSheetName )
|
||||
{
|
||||
m_sheetFullName = &aSheetName;
|
||||
m_sheetFullName = aSheetName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the sheet layer to draw/plot
|
||||
* @param aSheetLayer = the text to draw/plot by the "sheetlayer" format
|
||||
*/
|
||||
void SetSheetLayer( const wxString & aSheetLayer )
|
||||
void SetSheetLayer( const wxString& aSheetLayer )
|
||||
{
|
||||
m_sheetLayer = &aSheetLayer;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue