cmGrPlot.c : _cmGrPlotObjDestroy() now checks if the object about to be
destroyed is the focused object and updates p->fop accordingly.
This commit is contained in:
parent
67f4fddcd6
commit
a112c6b6a2
@ -92,6 +92,7 @@ cmGrPlotObj_t* _cmGrPlObjHandleToPtr( cmGrPlObjH_t oh )
|
|||||||
return op;
|
return op;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Destroy the embedded cmGrH_t object
|
||||||
cmGrPlRC_t _cmGrPlotObjDelete( cmGrPlotObj_t* op )
|
cmGrPlRC_t _cmGrPlotObjDelete( cmGrPlotObj_t* op )
|
||||||
{
|
{
|
||||||
if( op==NULL || cmGrObjIsValid( op->grH, op->grObjH)==false )
|
if( op==NULL || cmGrObjIsValid( op->grH, op->grObjH)==false )
|
||||||
@ -323,6 +324,13 @@ void _cmGrPlotObjDestroy( cmGrObjFuncArgs_t* args )
|
|||||||
{
|
{
|
||||||
cmGrPlotObj_t* op = args->cbArg;
|
cmGrPlotObj_t* op = args->cbArg;
|
||||||
|
|
||||||
|
// if the focused op is being destroyed
|
||||||
|
if( op->p->fop == op )
|
||||||
|
{
|
||||||
|
_cmGrPlotObjCb(op->p->fop, kStateChangeGrPlId, kFocusGrPlFl );
|
||||||
|
op->p->fop = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
// TODO: is it possible to prevent destruction by returning
|
// TODO: is it possible to prevent destruction by returning
|
||||||
// 'false' from the used defined callback. This feature is
|
// 'false' from the used defined callback. This feature is
|
||||||
// slightly complicated by the fact
|
// slightly complicated by the fact
|
||||||
|
Loading…
Reference in New Issue
Block a user