[Paraview-developers] Undo/Redo stack not getting updated

Sebastien Jourdain sebastien.jourdain at kitware.com
Tue Feb 14 14:16:12 EST 2012


Hi Pandu,

I've just pushed a fix on the stage under the branch
12937-undo-redo-zoom-to-box branch which should be integrated into the
3.14 release.

If you want to follow that, here is the bug report that I've made for
you: http://www.paraview.org/Bug/view.php?id=12937

Thanks for helping us improving our software.

Seb

On Tue, Feb 14, 2012 at 10:56 AM, Pandu tech <pandu4tech at gmail.com> wrote:
> 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
>
> _______________________________________________
> Paraview-developers mailing list
> Paraview-developers at paraview.org
> http://public.kitware.com/mailman/listinfo/paraview-developers
>


More information about the Paraview-developers mailing list