VirtualBox

Changeset 88737 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Apr 27, 2021 2:10:49 PM (4 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9930. Updating search better with tab change

Location:
trunk/src/VBox/Frontends/VirtualBox/src/logviewer
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerSearchPanel.cpp

    r88734 r88737  
    5858{
    5959    /* We start the search from the end of the doc. assuming log's end is more interesting: */
    60     performSearch(BackwardSearch, true);
     60    if (isVisible())
     61        performSearch(BackwardSearch, true);
     62    else
     63        reset();
     64
    6165    emit sigHighlightingUpdated();
    6266}
     
    6973    if (m_pSearchEditor)
    7074        m_pSearchEditor->reset();
     75    emit sigHighlightingUpdated();
    7176}
    7277
  • trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerSearchPanel.h

    r88707 r88737  
    5555    /** Resets the search position and starts a new search. */
    5656    void refresh();
    57     void reset();
    5857    const QVector<float> &matchLocationVector() const;
    5958    virtual QString panelName() const /* override */;
     
    104103    /** Searches the whole document and return the number of matches to the current search term. */
    105104    int countMatches(QTextDocument *pDocument, const QString &searchString) const;
     105    void reset();
     106
    106107    /** Holds the instance of search-editor we create. */
    107108    UISearchLineEdit *m_pSearchEditor;
  • trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerWidget.cpp

    r88735 r88737  
    417417{
    418418    /* Reapply the search to get highlighting etc. correctly */
    419     if (m_pSearchPanel && m_pSearchPanel->isVisible())
     419    if (m_pSearchPanel)
    420420        m_pSearchPanel->refresh();
    421421}
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette