Minor improvement and remove some use of ElementsCollectionItem and ElementsDefinition

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4407 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
blacksun
2016-03-29 17:23:58 +00:00
parent dd5d9c9504
commit 95e309ff18
8 changed files with 44 additions and 128 deletions

View File

@@ -16,8 +16,6 @@
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
*/
#include "diagrameventaddelement.h"
#include "elementscollectionitem.h"
#include "qetapp.h"
#include "integrationmoveelementshandler.h"
#include "elementfactory.h"
#include "diagram.h"
@@ -39,8 +37,7 @@ DiagramEventAddElement::DiagramEventAddElement(ElementsLocation &location, Diagr
m_element(nullptr)
{
//Check if there is an element at this location
ElementsCollectionItem *item = QETApp::collectionItem(location);
if (item)
if (location.isElement() && location.exist())
{
//location is an element, we build it, if build fail,
//m_running stay to false (by default), so this interface will be deleted at next event