Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable PDF Preview Previous/Next Buttons When Previous/Next Pages Do Not Exist #105

Open
klhes opened this issue Jun 10, 2016 · 3 comments

Comments

@klhes
Copy link
Contributor

klhes commented Jun 10, 2016

Description:
The Previous and Next buttons on the PDF Preview window are clickable when previous and next pages do not exist.

Steps to Recreate:

  1. Open LaTex Studio.
  2. Leave the example welcome.tex file open.
  3. Mouse over the Previous button. Notice that the button turns blue.
  4. Click the Previous button. Notice that it is clickable, even though a previous page does not exist.
  5. Steps 3 and 4 also apply to the Next button.

Expected Result:
When a previous or next page does not exist, the previous or next button should be disabled. It should not change color when on mouse-over, and it should not be clickable.

@Amitbhave
Copy link

Hi, I want to work on this issue.
Currently I am facing the following problem while running the project. I am getting following exception:

java.lang.OutOfMemoryError: Java heap space
at java.awt.image.DataBufferInt.(DataBufferInt.java:75)
at sun.awt.image.ImageRepresentation.convertToRGB(ImageRepresentation.java:284)
at sun.awt.image.ImageRepresentation.setPixels(ImageRepresentation.java:591)
at java.awt.image.AreaAveragingScaleFilter.accumPixels(AreaAveragingScaleFilter.java:213)
at java.awt.image.AreaAveragingScaleFilter.setPixels(AreaAveragingScaleFilter.java:278)
at sun.awt.image.OffScreenImageSource.sendPixels(OffScreenImageSource.java:137)
at sun.awt.image.OffScreenImageSource.produce(OffScreenImageSource.java:187)
at sun.awt.image.OffScreenImageSource.addConsumer(OffScreenImageSource.java:66)
at sun.awt.image.OffScreenImageSource.startProduction(OffScreenImageSource.java:80)
at java.awt.image.FilteredImageSource.startProduction(FilteredImageSource.java:183)
at sun.awt.image.ImageRepresentation.startProduction(ImageRepresentation.java:732)
at sun.awt.image.ToolkitImage.addWatcher(ToolkitImage.java:221)
at sun.awt.image.ToolkitImage.getProperty(ToolkitImage.java:169)
at javax.swing.ImageIcon.(ImageIcon.java:240)
at latexstudio.editor.pdf.PDFDisplay.drawPreviewOnJPanel(PDFDisplay.java:43)
at latexstudio.editor.pdf.PDFPreviewRefresher.drawPreview(PDFPreviewRefresher.java:63)
at latexstudio.editor.pdf.PDFPreviewRefresher.run(PDFPreviewRefresher.java:50)
at java.lang.Thread.run(Thread.java:745)

I googled to search for a solution which stated to edit netbeans.conf file but no luck. If anybody has solution to this problem please let me know so that I can start working on this enhancement.

Thanks,
Amit

@Amitbhave
Copy link

Issue fixed. Please find the pull request.:)

@Amitbhave
Copy link

@sebbrudzinski @klhes can you please verify the fix?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants