← Back to team overview

kicad-developers team mailing list archive

Re: [RFC] Nix sheet pin disambiguation menu

 

Here's a patch, have a look at it, and if you're okay with the
limitation I mentioned feel free to commit :)

On Mon, Sep 05, 2016 at 06:35:54PM -0400, Chris Pavlina wrote:
> I haven't tested it yet as I haven't written the patch yet. However, it
> is possible to select the sheet by grabbing its label, and eeschema does
> not allow sheet pins to be placed over labels, so the label should
> always be accessible.
> 
> I suppose you could force it, if you really tried, into a state where
> the sheet cannot be directly selected, by putting the sheet pin as high
> as it will go and then setting the text size very large so it overlaps
> everything. I don't see a problem with that though. It pretty much has
> to be deliberate, and you can still fix it by either setting the size
> back down, or using block select to pick up the sheet.
> 
> On Mon, Sep 05, 2016 at 06:24:03PM -0400, Wayne Stambaugh wrote:
> > I'm OK with this.  By chance did you test it with a really small sheet
> > size just to make sure that you can still select the sheet?  That's the
> > only potential issue I can see.
> > 
> > On 9/5/2016 11:13 AM, Chris Pavlina wrote:
> > > The disambiguation menu makes it absolutely tedious to move a large
> > > number of hierarchical sheet pins. Would a patch be accepted to make
> > > hierarchical sheet pins automatically preferred when the items under the
> > > cursor are only a sheet pin or a sheet?
> > > 
> > 
> > 
> > _______________________________________________
> > Mailing list: https://launchpad.net/~kicad-developers
> > Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> > Unsubscribe : https://launchpad.net/~kicad-developers
> > More help   : https://help.launchpad.net/ListHelp
>From 1d37a85f275782176e85700bb5ebbd3c943037b4 Mon Sep 17 00:00:00 2001
From: Chris Pavlina <pavlina.chris@xxxxxxxxx>
Date: Tue, 6 Sep 2016 01:01:34 -0400
Subject: [PATCH] eeschema: short-circuit disambiguation for {sheet pin, sheet}

---
 eeschema/controle.cpp | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/eeschema/controle.cpp b/eeschema/controle.cpp
index ba5ec74..63cf272 100644
--- a/eeschema/controle.cpp
+++ b/eeschema/controle.cpp
@@ -3,7 +3,7 @@
  *
  * Copyright (C) 2004 Jean-Pierre Charras, jaen-pierre.charras@xxxxxxxxxxxxxxxxxx
  * Copyright (C) 2008-2011 Wayne Stambaugh <stambaughw@xxxxxxxxxxx>
- * Copyright (C) 2004-2011 KiCad Developers, see change_log.txt for contributors.
+ * Copyright (C) 2004-2016 KiCad Developers, see AUTHORS.txt for contributors.
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -150,6 +150,17 @@ SCH_ITEM* SCH_EDIT_FRAME::LocateItem( const wxPoint& aPosition, const KICAD_T aF
                 {
                     item = m_collectedItems[0];
                 }
+                break;
+
+            case HK_MOVE_COMPONENT_OR_ITEM:
+                if( m_collectedItems.GetCount() == 2 &&
+                        dynamic_cast< SCH_SHEET_PIN * >( m_collectedItems[0] ) &&
+                        dynamic_cast< SCH_SHEET * >( m_collectedItems[1] ) )
+                {
+                    item = m_collectedItems[0];
+                }
+                break;
+
             default:
                 ;
             }
-- 
2.9.3


Follow ups

References