mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-18 05:00:33 +01:00
Folio List: XML save/open added. When Application starts, folio list is not added
so that user gets the option to choose whether he wants to add folio list or not. Bug remaining: - When open project file with folio_list present, folio list sheets are at the end, not at the beginning. - Possibly many others. Thorough testing required. git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@2847 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -1681,7 +1681,7 @@ void QETDiagramEditor::addDiagramToProject() {
|
||||
|
||||
void QETDiagramEditor::addDiagramFolioListToProject() {
|
||||
ProjectView *current_project = currentProject();
|
||||
if (current_project && DiagramFolioList::folioList_quantity == 0) {
|
||||
if (current_project && current_project -> project() -> getFolioSheetsQuantity() == 0) {
|
||||
int diagram_qty = current_project -> diagrams().size();
|
||||
for (int i = 0; i <= diagram_qty/58; i++)
|
||||
current_project -> addNewDiagramFolioList();
|
||||
@@ -1814,11 +1814,14 @@ void QETDiagramEditor::removeDiagramFromProject() {
|
||||
current_project -> removeDiagram(diag);
|
||||
}
|
||||
}
|
||||
//current_project ->project() ->setFolioSheetsQuantity(0);
|
||||
} else if (current_project -> diagrams().size() % 58 == 0) {
|
||||
foreach (DiagramView *diag, current_project -> diagrams()) {
|
||||
DiagramFolioList *ptr = dynamic_cast<DiagramFolioList *>(diag -> diagram());
|
||||
if (ptr && ptr -> getId() == DiagramFolioList::folioList_quantity-1) {
|
||||
if (ptr && ptr -> getId() == current_project -> project() -> getFolioSheetsQuantity() - 1) {
|
||||
current_project -> removeDiagram(diag);
|
||||
//int folioQuantity = current_project -> project() -> getFolioSheetsQuantity();
|
||||
//current_project -> project() -> setFolioSheetsQuantity(folioQuantity - 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user