comparison document/SVFileReader.cpp @ 84:41c491657587

* Further fix for restoring layer visibility from session file * Better handling of error state in bzip file device to avoid spurious errors * Fix #1495001 deleted layers prevail in saved session file
author Chris Cannam
date Fri, 05 Jan 2007 15:49:10 +0000
parents 0d2fb43b5ee5
children 8944f3005a15
comparison
equal deleted inserted replaced
83:0d2fb43b5ee5 84:41c491657587
789 789
790 layer->setProperties(attributes); 790 layer->setProperties(attributes);
791 } 791 }
792 792
793 if (!m_inData && m_currentPane) { 793 if (!m_inData && m_currentPane) {
794
795 QString visible = attributes.value("visible");
796 bool dormant = (visible == "false");
797
798 // We need to do this both before and after adding the layer
799 // to the view -- we need it to be dormant if appropriate
800 // before it's actually added to the view so that any property
801 // box gets the right state when it's added, but the add layer
802 // command sets dormant to false because it assumes it may be
803 // restoring a previously dormant layer, so we need to set it
804 // again afterwards too. Hm
805 layer->setLayerDormant(m_currentPane, dormant);
806
794 m_document->addLayerToView(m_currentPane, layer); 807 m_document->addLayerToView(m_currentPane, layer);
808
809 layer->setLayerDormant(m_currentPane, dormant);
795 } 810 }
796 811
797 return true; 812 return true;
798 } 813 }
799 814