Bug 149164 - Case sensistive search option gets reset
Summary: Case sensistive search option gets reset
Status: RESOLVED FIXED
Alias: None
Product: kpdf
Classification: Unmaintained
Component: general (show other bugs)
Version: 0.5.6
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Albert Astals Cid
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-08-24 12:57 UTC by James Shaw
Modified: 2007-08-26 20:22 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description James Shaw 2007-08-24 12:57:40 UTC
Version:           0.5.6 (using KDE KDE 3.5.6)
Installed from:    Ubuntu Packages
OS:                Linux

Open the search dialog, check "Case sensitive" search, and perform the search.  When the dialog box is opened again, "Case sensitive" has been unchecked.
Comment 1 Pino Toscano 2007-08-24 13:01:18 UTC
Well, more than "reset", that option is not saved... :)
Comment 2 Pino Toscano 2007-08-26 20:22:37 UTC
SVN commit 704964 by pino:

Save the case sensitivity of a search across multiple search sessions each time a document is open.

BUG: 149164


 M  +7 -1      part.cpp  


--- branches/KDE/3.5/kdegraphics/kpdf/part.cpp #704963:704964
@@ -768,6 +768,7 @@
 
 void Part::slotFind()
 {
+    static bool savedCaseSensitive = false;
     KFindDialog dlg( widget() );
     dlg.setHasCursor( false );
     if ( !m_searchHistory.empty() )
@@ -777,12 +778,17 @@
     dlg.setSupportsWholeWordsFind( false );
     dlg.setSupportsRegularExpressionFind( false );
 #endif
+    if ( savedCaseSensitive )
+    {
+        dlg.setOptions( dlg.options() | KFindDialog::CaseSensitive );
+    }
     if ( dlg.exec() == QDialog::Accepted )
     {
+        savedCaseSensitive = dlg.options() & KFindDialog::CaseSensitive;
         m_searchHistory = dlg.findHistory();
         m_searchStarted = true;
         m_document->resetSearch( PART_SEARCH_ID );
-        m_document->searchText( PART_SEARCH_ID, dlg.pattern(), false, dlg.options() & KFindDialog::CaseSensitive,
+        m_document->searchText( PART_SEARCH_ID, dlg.pattern(), false, savedCaseSensitive,
                                 KPDFDocument::NextMatch, true, qRgb( 255, 255, 64 ) );
     }
 }