kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #00075
Patch: Make hierarchical sheets non-zero size
-
To:
kicad-devel@xxxxxxxxxxxxxxx
-
From:
Mitch Bradley <wmb@...>
-
Date:
Fri, 31 Mar 2006 07:08:43 -1000
-
In-reply-to:
<1143795278.223.18081.m16@yahoogroups.com>
-
User-agent:
Thunderbird 1.5 (Windows/20051201)
This patch against kicad-2006-03-28 enforces a small but easily visible
minimum size on hierarchical sheets, thus preventing you from making a
zero-size sheet that is difficult to manipulate. The minimum size is
roughly the same size as a short text string in the default text size.
diff -c -C 2 -r kicad-dev-2006-03-28/eeschema/sheet.cpp
kicad-dev/eeschema/sheet.cpp
*** kicad-dev-2006-03-28/eeschema/sheet.cpp Tue Feb 28 10:44:06 2006
--- kicad-dev/eeschema/sheet.cpp Fri Mar 31 00:35:33 2006
***************
*** 310,315 ****
--- 310,317 ----
}
+ #define SHEET_MIN_WIDTH 500
+ #define SHEET_MIN_HEIGHT 150
/****************************************************************/
DrawSheetStruct * WinEDA_SchematicFrame::CreateSheet(wxDC * DC)
/****************************************************************/
***************
*** 322,328 ****
Sheet->m_Flags = IS_NEW | IS_RESIZED;
Sheet->m_TimeStamp = GetTimeStamp();
Sheet->m_Parent = m_CurrentScreen;
! SheetMindx = SheetMindy = 0;
m_CurrentScreen->m_CurrentItem = Sheet;
--- 324,331 ----
Sheet->m_Flags = IS_NEW | IS_RESIZED;
Sheet->m_TimeStamp = GetTimeStamp();
Sheet->m_Parent = m_CurrentScreen;
! SheetMindx = SHEET_MIN_WIDTH;
! SheetMindy = SHEET_MIN_HEIGHT;
m_CurrentScreen->m_CurrentItem = Sheet;
***************
*** 358,364 ****
OldPos.y = Sheet->m_End.y;
/* Recalcul des dims min de la sheet */
! SheetMindx = SheetMindy = 0;
sheetlabel = Sheet->m_Label;
while(sheetlabel)
{
--- 361,368 ----
OldPos.y = Sheet->m_End.y;
/* Recalcul des dims min de la sheet */
! SheetMindx = SHEET_MIN_WIDTH;
! SheetMindy = SHEET_MIN_HEIGHT;
sheetlabel = Sheet->m_Label;
while(sheetlabel)
{