From 15aa24afe8bc8cf6f8f7cf38bbc200f0ed74c932 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 13 Nov 2014 17:32:59 +0100 Subject: [PATCH] pcbnew: Modules can be selected with block selection tool without including texts & references (GAL). --- pcbnew/class_module.cpp | 6 ++++++ pcbnew/class_module.h | 3 +++ 2 files changed, 9 insertions(+) diff --git a/pcbnew/class_module.cpp b/pcbnew/class_module.cpp index 7bf8af178f..d564b3f639 100644 --- a/pcbnew/class_module.cpp +++ b/pcbnew/class_module.cpp @@ -863,6 +863,12 @@ unsigned int MODULE::ViewGetLOD( int aLayer ) const return 30; } +const BOX2I MODULE::ViewBBox() const +{ + EDA_RECT fpRect = GetFootprintRect(); + + return BOX2I( VECTOR2I( fpRect.GetOrigin() ), VECTOR2I( fpRect.GetSize() ) ); +} /* Test for validity of the name in a library of the footprint * ( no spaces, dir separators ... ) diff --git a/pcbnew/class_module.h b/pcbnew/class_module.h index 27b87ab889..a34e610784 100644 --- a/pcbnew/class_module.h +++ b/pcbnew/class_module.h @@ -491,6 +491,9 @@ public: /// @copydoc VIEW_ITEM::ViewGetLOD() virtual unsigned int ViewGetLOD( int aLayer ) const; + /// @copydoc VIEW_ITEM::ViewBBox() + virtual const BOX2I ViewBBox() const; + /** * Function CopyNetlistSettings * copies the netlist settings to \a aModule.