mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 12:40:35 +01:00
Folio List: DXF folio corrected, Delete folio sheet bug corrected,
Folio New Sheets are inserted in the beginning but after the previous folio sheets git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@2846 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -865,34 +865,12 @@ Diagram *QETProject::addNewDiagramFolioList() {
|
||||
*/
|
||||
void QETProject::removeDiagram(Diagram *diagram) {
|
||||
// ne fait rien si le projet est en lecture seule
|
||||
if (isReadOnly()) return;
|
||||
|
||||
if (isReadOnly()) return;
|
||||
if (!diagram || !diagrams_.contains(diagram)) return;
|
||||
|
||||
DiagramFolioList *ptr = dynamic_cast<DiagramFolioList *>(diagram);
|
||||
if (ptr) {
|
||||
foreach (Diagram *diag, diagrams_) {
|
||||
ptr = dynamic_cast<DiagramFolioList *>(diag);
|
||||
if (ptr) {
|
||||
diagrams_.removeAll(ptr);
|
||||
emit(diagramRemoved(this, ptr));
|
||||
delete ptr;
|
||||
}
|
||||
}
|
||||
} else if (diagrams_.removeAll(diagram)) {
|
||||
if (diagrams_.removeAll(diagram)) {
|
||||
emit(diagramRemoved(this, diagram));
|
||||
delete diagram;
|
||||
if (diagrams_.size() % 58 == 0) {
|
||||
foreach (Diagram *diag, diagrams_) {
|
||||
ptr = dynamic_cast<DiagramFolioList *>(diag);
|
||||
if (ptr && ptr -> getId() == DiagramFolioList::folioList_quantity-1) {
|
||||
diagrams_.removeAll(ptr);
|
||||
emit(diagramRemoved(this, ptr));
|
||||
delete ptr;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
updateDiagramsFolioData();
|
||||
|
||||
Reference in New Issue
Block a user