Fixed crash on undo layer change in TEXTE_MODULE.
This commit is contained in:
parent
7650b0e8ad
commit
74584e2081
|
@ -493,6 +493,9 @@ unsigned int TEXTE_MODULE::ViewGetLOD( int aLayer ) const
|
||||||
{
|
{
|
||||||
const int MAX = std::numeric_limits<unsigned int>::max();
|
const int MAX = std::numeric_limits<unsigned int>::max();
|
||||||
|
|
||||||
|
if( !m_view )
|
||||||
|
return 0;
|
||||||
|
|
||||||
if( m_Type == TEXT_is_VALUE && !m_view->IsLayerVisible( ITEM_GAL_LAYER( MOD_VALUES_VISIBLE ) ) )
|
if( m_Type == TEXT_is_VALUE && !m_view->IsLayerVisible( ITEM_GAL_LAYER( MOD_VALUES_VISIBLE ) ) )
|
||||||
return MAX;
|
return MAX;
|
||||||
|
|
||||||
|
|
|
@ -383,6 +383,7 @@ int EDIT_TOOL::Properties( const TOOL_EVENT& aEvent )
|
||||||
// Display properties dialog
|
// Display properties dialog
|
||||||
BOARD_ITEM* item = selection.Item<BOARD_ITEM>( 0 );
|
BOARD_ITEM* item = selection.Item<BOARD_ITEM>( 0 );
|
||||||
|
|
||||||
|
// Store the head of the undo list to compare if anything has changed
|
||||||
std::vector<PICKED_ITEMS_LIST*>& undoList = editFrame->GetScreen()->m_UndoList.m_CommandsList;
|
std::vector<PICKED_ITEMS_LIST*>& undoList = editFrame->GetScreen()->m_UndoList.m_CommandsList;
|
||||||
|
|
||||||
// Some of properties dialogs alter pointers, so we should deselect them
|
// Some of properties dialogs alter pointers, so we should deselect them
|
||||||
|
|
Loading…
Reference in New Issue