Ticket #511 (closed defect: fixed)

Opened 9 years ago

Last modified 9 years ago

Image window sometimes does not resize upon dimension change

Reported by: bdezonia Owned by: bdezonia
Priority: major Milestone: biweekly-2011: May-09 to May-20
Component: Display API Version:
Severity: serious Keywords:
Cc: Blocked By:


Code to repack the image window is now in place. And if you run crop or rotate 90 it works under special circumstances. (in fact it is written to work in the general case).

basically if you load an image and then rotate or crop it the window is not resized correctly. However if you first slightly change the window size then every rotation and crop afterwards works correctly. there is some initialization code that must not be getting run. please find and fix.

(note that this issue has been around for quite some time)

Change History

comment:1 Changed 9 years ago by bdezonia

There is a point where the correct code will fix this in SwingDisplayWindow::redoLayout(). Just before the pack() we need to call this.setPreferredSize(). It is difficult to know what the correct values are here but testing with hard coded values shows that this will fix the bug.

comment:2 Changed 9 years ago by bdezonia

Cannot fix this at the moment. Bug #518 now rears it's head before this one can happen.

comment:3 Changed 9 years ago by bdezonia

  • Status changed from new to closed
  • Resolution set to fixed

As of 4db5647609829d3e9bad8bee379a36ce582e1a00 (sometime after replacement of SwingImageCanvas with JHotDrawImageCanvas) this is no longer a problem. There are other issues that I will report in a different ticket.

Note: See TracTickets for help on using tickets.