高级会员
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
|
【转帖】oddbentity.highlight9true0 not appears for cloned entity in
oddbentity.highlight(true) not appears for cloned entity in
oddbentity.highlight(true) not appears for cloned entity in worlddraw(odgiworlddraw*)
hallo,
i will mimic autocad object highlighting, when mouse hover an entity.
my code:
class choverdrawable: public odgidrawableimpl<>
{
oddbentityptr m_pclone;
}
void choverdrawable::cloneentity()
{
m_pclone = 0;
oddbobjectptr pobj = entityid().safeopenobject();
oddbentityptr pentity = oddbentity::cast( pobj);
if ( pentity->clonemefordragging() )
{
m_pclone = oddbentity::cast( pentity->clone() );
}
if ( false == m_pclone.isnull() )
{
m_pclone->disableundorecording( true );
m_pclone->setpropertiesfrom( pentity.get() );
m_pclone->setcolor(m_color);
m_pclone->highlight(true);
}
}
bool choverdrawable:: worlddraw( odgiworlddraw* pworlddraw ) const
{
if(m_pclone.isnull()==false)
{
pworlddraw->geometry().draw(m_pclone); // not work
m_pclone->worlddraw(pworlddraw); // not work
}
}
has anibody a answer to this poblemm ?
sorry for the bad english description.
thanks
entity highlighting
in this example, creates a transient drawable. such drawables do not support highlighting, because not related to gsmodel and not have gscache.
only database-related drawables can be highlighted.
|