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:
jean-pierre charras 2018-03-10 10:25:07 +01:00
parent 83d5a770e8
commit 2230abde1b
2 changed files with 13 additions and 12 deletions

View File

@ -177,6 +177,7 @@ wxString WS_DRAW_ITEM_LIST::BuildFullText( const wxString& aTextbase )
break;
case 'Z':
if( m_paperFormat )
msg += *m_paperFormat;
break;
@ -196,11 +197,12 @@ wxString WS_DRAW_ITEM_LIST::BuildFullText( const wxString& aTextbase )
break;
case 'L':
if( m_sheetLayer )
msg += *m_sheetLayer;
break;
case 'P':
msg += *m_sheetFullName;
msg += m_sheetFullName;
break;
case 'Y':

View File

@ -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()
@ -427,7 +426,7 @@ public:
*/
void SetSheetName( const wxString& aSheetName )
{
m_sheetFullName = &aSheetName;
m_sheetFullName = aSheetName;
}
/**