Пример #1
0
//---------------------------------------------------------
void CACTIVE_Attributes::Save_Changes(bool bConfirm)
{
	if( m_pItem && m_pAttributes->is_Modified() && (!bConfirm || DLG_Message_Confirm(_TL("Save changes?"), _TL("Attributes"))) )
	{
		m_pItem->Edit_Get_Attributes()->Assign_Values(m_pAttributes);
		m_pItem->Edit_Set_Attributes();

		Set_Attributes();
	}
}
Пример #2
0
//---------------------------------------------------------
bool CLine_Crossings::Set_Crossing(const TSG_Point &Crossing, CSG_Shape *pA, CSG_Shape *pB, CSG_Shape *pCrossing, int Attributes)
{
	int	Offset	= 0;

	if( Attributes == 0 || Attributes == 2 )
	{
		pCrossing->Set_Value(Offset++, pA->Get_Index());
		pCrossing->Set_Value(Offset++, pB->Get_Index());
	}

	if( Attributes == 1 || Attributes == 2 )
	{
		Set_Attributes(pCrossing, pA, Offset);
		Set_Attributes(pCrossing, pB, Offset);
	}

	pCrossing->Set_Point(Crossing, 0);

	return( true );
}
Пример #3
0
//---------------------------------------------------------
void CACTIVE_Attributes::Set_Item(CWKSP_Layer *pItem)
{
	if( m_pItem != pItem )
	{
		Save_Changes(true);

		m_pItem	= pItem;

		Set_Attributes();
	}
}
Пример #4
0
//---------------------------------------------------------
void CACTIVE_Attributes::On_Restore(wxCommandEvent &event)
{
	Set_Attributes();
}