seantronsen / pvt

GNU General Public License v3.0
0 stars 0 forks source link

Bug: Viewing features like zoom automatically reset on next render #16

Closed seantrons closed 5 months ago

seantrons commented 6 months ago

This problem is especially apparent for animated views where zooming, panning, etc. just feels impossible. For static views, this is less of a problem.

Perhaps provide a setting that enables users to persist view port settings to new frames. For animations, it should be enabled by default.

seantrons commented 6 months ago

This issue occurs only for display panes which make use of an autoRange=True feature being enabled by default. The current impl. only has this enabled by default for the ImagePane class.

I'm on the fence as for which of the following is the best approach for now:

seantrons commented 6 months ago

Option II is likely the best choice.

seantrons commented 5 months ago

Added some optional flags to the ImagePane class constructor that users can use to disable the default behavior. The example in the demo has been updated to reflect this.

# set to False if panning and zoom should not reset on each new frame
ip = ImagePane(callback_0, autoRange=True)

Impl. in commit: https://github.com/seantronsen/qtviewer/commit/d37a38ec7739bb7492ac5bac2519981a1cdc7a79 Closing.