Menu

#211 Infinite resize loop of view area in djview

djview
closed
nobody
None
5
2013-04-01
2013-02-18
hajaju
No

I observe endless loop of resize (forth and back) operations of view area while viewing djvu file and it took me while to understand what is going on. (djview 4.9)
The issue is triggered when viewing OCRed djvu file. When you you are at cursor position where is some OCRed text djview put that text into statusbar. For some reason the status bar is vertically resized to two lines instead of one (the text does not look like two liner). That changes the size of the view area. That chages relative position of the text you stand on with your cursor, very often to empy space. That removes the text from statusbar and resize it back.
Now you are at the start and you have infinte flashing djview window.

Related

Bugs: #211

Discussion

  • Leon Bottou

    Leon Bottou - 2013-02-19

    Interesting.
    Did you compile djview yourself?
    Is it fixed by the following patch?
    Thanks.

    • L.

    --- a/src/qdjview.cpp
    +++ b/src/qdjview.cpp
    @@ -3820,7 +3820,7 @@ QDjView::updateTextLabel()
    QFontMetrics m(textLabel->font());
    QString lb = QString::fromUtf8(" \302\253 ");
    QString rb = QString::fromUtf8(" \302\273 ");

    • int w = textLabel->width() - m.width(lb+rb);
    • int w = textLabel->width() - m.width(lb + rb + "MM");
      if (! textLabelRect.isEmpty())
      {
      text = widget->getTextForRect(textLabelRect);

    On Monday, February 18, 2013 10:20:17 PM hajaju wrote:


    ** [bugs:#211] Infinite resize loop of view area in djview**

    Status: open
    Created: Mon Feb 18, 2013 10:20 PM UTC by hajaju
    Last Updated: Mon Feb 18, 2013 10:20 PM UTC
    Owner: nobody

    I observe endless loop of resize (forth and back) operations of view area
    while viewing djvu file and it took me while to understand what is going
    on. (djview 4.9) The issue is triggered when viewing OCRed djvu file. When
    you you are at cursor position where is some OCRed text djview put that
    text into statusbar. For some reason the status bar is vertically resized
    to two lines instead of one (the text does not look like two liner). That
    changes the size of the view area. That chages relative position of the
    text you stand on with your cursor, very often to empy space. That removes
    the text from statusbar and resize it back. Now you are at the start and
    you have infinte flashing djview window.


    Sent from sourceforge.net because you indicated interest in
    https://sourceforge.net/p/djvu/bugs/211/

    To unsubscribe from further messages, please visit
    https://sourceforge.net/auth/prefs/

     

    Related

    Bugs: #211

  • hajaju

    hajaju - 2013-02-20

    No it does not help, even if i tried to play with texlabel width even more.
    What about setting vertical size of the statusbar to be constant?

     
  • Leon Bottou

    Leon Bottou - 2013-02-20

    What about this ?

    • L.

    --- a/src/qdjview.cpp
    +++ b/src/qdjview.cpp
    @@ -984,6 +984,7 @@ QDjView::updateActions()

    // Misc
    textLabel->setVisible(prefs->showTextLabel);

    • textLabel->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Ignored);
      actionCopyOutline->setVisible(prefs->advancedFeatures);
      actionCopyAnnotation->setVisible(prefs->advancedFeatures);
      actionCopyUrl->setEnabled(pagenum > 0);

    On Wednesday, February 20, 2013 04:09:58 AM hajaju wrote:

    No it does not help, even if i tried to play with texlabel width even more.
    What about setting vertical size of the statusbar to be constant?


    ** [bugs:#211] Infinite resize loop of view area in djview**

    Status: open
    Created: Mon Feb 18, 2013 10:20 PM UTC by hajaju
    Last Updated: Mon Feb 18, 2013 10:20 PM UTC
    Owner: nobody

    I observe endless loop of resize (forth and back) operations of view area
    while viewing djvu file and it took me while to understand what is going
    on. (djview 4.9) The issue is triggered when viewing OCRed djvu file. When
    you you are at cursor position where is some OCRed text djview put that
    text into statusbar. For some reason the status bar is vertically resized
    to two lines instead of one (the text does not look like two liner). That
    changes the size of the view area. That chages relative position of the
    text you stand on with your cursor, very often to empy space. That removes
    the text from statusbar and resize it back. Now you are at the start and
    you have infinte flashing djview window.


    Sent from sourceforge.net because you indicated interest in
    https://sourceforge.net/p/djvu/bugs/211/

    To unsubscribe from further messages, please visit
    https://sourceforge.net/auth/prefs/

     

    Related

    Bugs: #211

  • Leon Bottou

    Leon Bottou - 2013-03-30
    • status: open --> closed
     
  • Leon Bottou

    Leon Bottou - 2013-03-30

    I assume no answer means it works...

     
  • hajaju

    hajaju - 2013-04-01

    In this case no answer means I didn't get mail from sf or it get eaten by antispam etc.
    I tested your patch and this time it helped, please apply to trunk.

     

Log in to post a comment.

MongoDB Logo MongoDB