[Paraview-developers] Undo/Redo stack not getting updated
Pandu tech
pandu4tech at gmail.com
Tue Feb 14 10:56:12 EST 2012
Hi,
In 3D view, undo/redo actions are working properly. But when a ZOOM BOX is
applied and then undo is done, it is not reverting to latest change.
I observed that onUndoStackChanged() SLOT of pqRenderView.cxx is not
getting invoked whenever a zoom box is applied.
In all other cases like Mouse movement, ResetCamera this SLOT is getting
invoked and accordingly Undo/Redo stack size is incremented.
When zoom box is applied, we need to emit a signal/event so that stack gets
updated and increments its count.
Please suggest your ideas to fix this.
Thanks for your help.
//-----------------------------------------------------------------------------
void pqRenderView::InternalConstructor(vtkSMViewProxy* renModule)
{
this->Internal = new pqRenderView::pqInternal();
// we need to fire signals when undo stack changes.
this->getConnector()->Connect(this->Internal->InteractionUndoStack,
vtkCommand::ModifiedEvent, this, SLOT(onUndoStackChanged()), * //
SIGNAL SLOT connection made for InteractionUndoStack*
0, 0, Qt::QueuedConnection);
this->ResetCenterWithCamera = true;
this->UseMultipleRepresentationSelection = false;
this->getConnector()->Connect(
renModule, vtkCommand::ResetCameraEvent,
this, SLOT(onResetCameraEvent()));
}
//-----------------------------------------------------------------------------
void pqRenderView::onUndoStackChanged()
{
bool can_undo = this->Internal->InteractionUndoStack->CanUndo();
bool can_redo = this->Internal->InteractionUndoStack->CanRedo();
emit this->canUndoChanged(can_undo);
emit this->canRedoChanged(can_redo);
}
Regards,
Pandu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview-developers/attachments/20120214/27562670/attachment.htm>
More information about the Paraview-developers
mailing list