Fixed crash on undo layer change in TEXTE_MODULE.

This commit is contained in:
Maciej Suminski 2015-07-24 09:42:46 +02:00
parent 7650b0e8ad
commit 74584e2081
2 changed files with 4 additions and 0 deletions

View File

@ -493,6 +493,9 @@ unsigned int TEXTE_MODULE::ViewGetLOD( int aLayer ) const
{
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 ) ) )
return MAX;

View File

@ -383,6 +383,7 @@ int EDIT_TOOL::Properties( const TOOL_EVENT& aEvent )
// Display properties dialog
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;
// Some of properties dialogs alter pointers, so we should deselect them