Mon, 30 Jan 2017 02:18:42 +0200
Removed LDDocument::getObjectCount (superceded by Model::size)
src/glRenderer.cpp | file | annotate | diff | comparison | revisions | |
src/ldDocument.cpp | file | annotate | diff | comparison | revisions | |
src/ldDocument.h | file | annotate | diff | comparison | revisions | |
src/mainwindow.cpp | file | annotate | diff | comparison | revisions | |
src/toolsets/viewtoolset.cpp | file | annotate | diff | comparison | revisions |
--- a/src/glRenderer.cpp Mon Jan 30 00:59:06 2017 +0200 +++ b/src/glRenderer.cpp Mon Jan 30 02:18:42 2017 +0200 @@ -1468,7 +1468,7 @@ int lastOverlayPosition = -1; bool found = false; - for (i = 0; i < document()->getObjectCount(); ++i) + for (i = 0; i < document()->size(); ++i) { LDObject* object = document()->getObject (i);
--- a/src/ldDocument.cpp Mon Jan 30 00:59:06 2017 +0200 +++ b/src/ldDocument.cpp Mon Jan 30 02:18:42 2017 +0200 @@ -387,13 +387,6 @@ // ============================================================================= // -int LDDocument::getObjectCount() const -{ - return countof(objects()); -} - -// ============================================================================= -// bool LDDocument::hasUnsavedChanges() const { return not isCache() and history()->position() != savePosition();
--- a/src/ldDocument.h Mon Jan 30 00:59:06 2017 +0200 +++ b/src/ldDocument.h Mon Jan 30 02:18:42 2017 +0200 @@ -70,7 +70,6 @@ void forgetObject (LDObject* obj); QString fullPath(); QString getDisplayName(); - int getObjectCount() const; const QSet<LDObject*>& getSelection() const; LDGLData* glData(); bool hasUnsavedChanges() const;
--- a/src/mainwindow.cpp Mon Jan 30 00:59:06 2017 +0200 +++ b/src/mainwindow.cpp Mon Jan 30 02:18:42 2017 +0200 @@ -326,8 +326,8 @@ title += ": "; title += m_currentDocument->getDisplayName(); - if (m_currentDocument->getObjectCount() > 0 and - m_currentDocument->getObject (0)->type() == OBJ_Comment) + if (m_currentDocument->size() > 0 and + m_currentDocument->getObject(0)->type() == OBJ_Comment) { // Append title LDComment* comm = static_cast <LDComment*> (m_currentDocument->getObject (0)); @@ -600,7 +600,7 @@ return (*(selectedObjects().end() - 1))->lineNumber() + 1; // Otherwise place the object at the end. - return m_currentDocument->getObjectCount(); + return m_currentDocument->size(); } // ---------------------------------------------------------------------------------------------------------------------
--- a/src/toolsets/viewtoolset.cpp Mon Jan 30 00:59:06 2017 +0200 +++ b/src/toolsets/viewtoolset.cpp Mon Jan 30 02:18:42 2017 +0200 @@ -255,7 +255,7 @@ { bool ok; int defaultValue = (countof(selectedObjects()) == 1) ? (*selectedObjects().begin())->lineNumber() : 0; - int index = QInputDialog::getInt (nullptr, "Go to line", "Go to line:", defaultValue, 1, currentDocument()->getObjectCount(), 1, &ok); + int index = QInputDialog::getInt (nullptr, "Go to line", "Go to line:", defaultValue, 1, currentDocument()->size(), 1, &ok); if (ok) {