Re-allocate the rawImage buffer if the number of channels has changed.
ClosedPublic

Authored by murveit on Jan 20 2020, 7:38 AM.

Details

Summary

If the number of channels changes during a session (rare, but can happen now that the
simulator can be changed from mono to rgb and back) then the rawImage buffer needs to be
re-allocated.

Test Plan

Using the new Indi ccd simulator capability to switch between rgb and mono,
if you do this in one session without this fix, you'll see the fitsviewer
not display the image properly after the change (though it would it you saved configuration
and restarted kstars). With this fix, that bug should go away--e.g. change the
ccd simulator to rgb, capture an image, note the display is reasonable, switch again, should
be reasonable again.

Diff Detail

Repository
R321 KStars
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
murveit created this revision.Jan 20 2020, 7:38 AM
Restricted Application added a project: KDE Edu. · View Herald TranscriptJan 20 2020, 7:38 AM
Restricted Application added a subscriber: kde-edu. · View Herald Transcript
murveit requested review of this revision.Jan 20 2020, 7:38 AM
mutlaqja accepted this revision.Jan 20 2020, 7:39 AM
This revision is now accepted and ready to land.Jan 20 2020, 7:39 AM
This revision was automatically updated to reflect the committed changes.