~ubuntu-branches/ubuntu/utopic/kile/utopic

« back to all changes in this revision

Viewing changes to src/widgets/structurewidget.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Felix Geyer
  • Date: 2010-05-13 12:24:49 UTC
  • mfrom: (1.1.20 upstream)
  • Revision ID: james.westby@ubuntu.com-20100513122449-krjybyi5lk5nejll
Tags: 1:2.1.0~svn1112278beta4-1ubuntu1
* Merge from Debian unstable (LP: #579884), remaining changes:
  - debian/control: Recommend firefox instead of iceweasel to have it look
    like (konqueror | firefox); on default Ubuntu kile will then no longer
    install konqueror. (LP: #452079)
  - debain/control: Don't suggest kile-i18n
  - debian/kile-doc.install: Install to /usr/share/doc/kde/HTML
* Remove revert-rev1086758.diff, replaced by
  00_root_document_not_detected_kde_bug_233667.diff

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
    begin                : Sun Dec 28 2003
3
3
    copyright            : (C) 2003 by Jeroen Wijnhout (Jeroen.Wijnhout@kdemail.net
4
4
                               2005-2007 by Holger Danielsson (holger.danielsson@versanet.de)
5
 
                               2008-2010 by Michel Ludwig (michel.ludwig@kdemail.net)
 
5
                               2008 by Michel Ludwig (michel.ludwig@kdemail.net)
6
6
 *************************************************************************************************/
7
7
 
8
8
/***************************************************************************
948
948
 
949
949
        void StructureWidget::update(KileDocument::Info *docinfo)
950
950
        {
951
 
                update(docinfo, false);
 
951
                update(docinfo, true);
952
952
        }
953
953
 
954
 
        void StructureWidget::update(KileDocument::Info *docinfo, bool forceParsing, bool activate /* =true */)
 
954
        void StructureWidget::update(KileDocument::Info *docinfo, bool parse, bool activate /* =true */)
955
955
        {
956
956
                KILE_DEBUG() << "==KileWidget::StructureWidget::update(" << docinfo << ")=============";
957
957
 
961
961
                }
962
962
 
963
963
                m_docinfo = docinfo;
964
 
                bool needParsing = forceParsing || m_docinfo->isDirty() || !viewExistsFor(docinfo);
 
964
 
 
965
                bool needParsing = parse || ( ! viewExistsFor(m_docinfo) );
965
966
 
966
967
                //find structview-item for this docinfo
967
968
                StructureView *view = viewFor(m_docinfo);
968
 
                if(!view) {
969
 
                        m_default->activate();
970
 
                        return;
971
 
                }
972
969
 
973
970
                if(needParsing) { //need to reparse the doc
974
971
                        int xtop = view->horizontalScrollBar()->value();
975
972
                        int ytop = view->verticalScrollBar()->value();
976
973
                        //KILE_DEBUG() << "\tStructure::update parsing doc";
977
 
                        // avoid flickering when parsing
978
 
                        view->setUpdatesEnabled(false);
979
974
                        view->cleanUp();
980
975
                        m_docinfo->updateStruct();
981
 
                        view->setUpdatesEnabled(true);
982
976
                        view->showReferences(m_ki);
983
977
                        view->horizontalScrollBar()->setValue(xtop);
984
978
                        view->verticalScrollBar()->setValue(ytop);