Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kicad-source-mirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
kicad-source-mirror
Commits
6431e9c9
Commit
6431e9c9
authored
Mar 10, 2009
by
charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pcbnew, gerbview: print&plot: error message displayed when no layer selected.
parent
6cdf7e83
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
1015 additions
and
176 deletions
+1015
-176
CHANGELOG.txt
CHANGELOG.txt
+8
-0
libedit.cpp
eeschema/libedit.cpp
+39
-34
kicad.mo
internat/fr/kicad.mo
+0
-0
kicad.po
internat/fr/kicad.po
+875
-76
libs.win
libs.win
+2
-2
dialog_print_using_printer.cpp
pcbnew/dialog_print_using_printer.cpp
+86
-64
pcbplot.cpp
pcbnew/pcbplot.cpp
+5
-0
No files found.
CHANGELOG.txt
View file @
6431e9c9
...
...
@@ -5,6 +5,14 @@ Started 2007-June-11
Please add newer entries at the top, list the date and your name with
email address.
2009-mar-10 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
================================================================================
++pcbnew:
++gerbview:
print,plot: error message displayed when no layer selected.
2009-Mar-5 UPDATE Vesa Solonen <vesa.solonen@hut.fi>
================================================================================
++pcbnew:
...
...
eeschema/libedit.cpp
View file @
6431e9c9
...
...
@@ -21,10 +21,6 @@
#include "id.h"
#include "dialog_create_component.h"
/* Routines locales */
/* Variables locales */
/**********************************************/
void
WinEDA_LibeditFrame
::
DisplayLibInfos
()
...
...
@@ -47,7 +43,7 @@ void WinEDA_LibeditFrame::DisplayLibInfos()
if
(
!
CurrentAliasName
.
IsEmpty
()
)
msg
<<
wxT
(
" Alias "
)
<<
CurrentAliasName
;
}
wxChar
UnitLetter
[]
=
wxT
(
"?ABCDEFGHIJKLMNOPQRSTUVWXYZ"
);
static
wxChar
UnitLetter
[]
=
wxT
(
"?ABCDEFGHIJKLMNOPQRSTUVWXYZ"
);
msg
<<
wxT
(
" Unit "
)
<<
UnitLetter
[
CurrentUnit
];
if
(
CurrentConvert
>
1
)
...
...
@@ -66,7 +62,7 @@ void WinEDA_LibeditFrame::DisplayLibInfos()
void
WinEDA_LibeditFrame
::
SelectActiveLibrary
()
/**************************************************/
/*
Routine to Select Current library
/*
Function to select the current library (working library)
*/
{
LibraryStruct
*
Lib
;
...
...
@@ -80,10 +76,15 @@ void WinEDA_LibeditFrame::SelectActiveLibrary()
}
/*************************************************/
/* Routine to Load one selected library content. */
/*************************************************/
bool
WinEDA_LibeditFrame
::
LoadOneLibraryPart
()
/**
* Function LoadOneLibraryPart()
* load a library component from the current selected library
* Prompt user for component name
* If there is no current selected library,
* prompt user for library name and make the selected library the current lib.
*/
{
int
i
;
wxString
msg
;
...
...
@@ -96,10 +97,11 @@ bool WinEDA_LibeditFrame::LoadOneLibraryPart()
return
FALSE
;
}
if
(
CurrentLib
==
NULL
)
if
(
CurrentLib
==
NULL
)
// No current lib, ask user for the library to use
{
SelectActiveLibrary
();
return
FALSE
;
if
(
CurrentLib
==
NULL
)
return
FALSE
;
}
i
=
GetNameOfPartToLoad
(
this
,
CurrentLib
,
CmpName
);
...
...
@@ -109,13 +111,13 @@ bool WinEDA_LibeditFrame::LoadOneLibraryPart()
g_ScreenLib
->
ClrModify
();
CurrentDrawItem
=
NULL
;
//
Effacement ancien composant affich�
//
Delete previous library component, if any
if
(
CurrentLibEntry
)
{
SAFE_DELETE
(
CurrentLibEntry
);
}
/*
Chargement du composa
nt */
/*
Load the new library compone
nt */
LibEntry
=
FindLibPart
(
CmpName
.
GetData
(),
CurrentLib
->
m_Name
,
FIND_ALIAS
);
if
(
LibEntry
==
NULL
)
...
...
@@ -199,7 +201,8 @@ int WinEDA_LibeditFrame::LoadOneLibraryPartAux(
/*********************************************************************/
void
WinEDA_LibeditFrame
::
RedrawActiveWindow
(
wxDC
*
DC
,
bool
EraseBg
)
/*********************************************************************/
/* Routine generale d'affichage a l'ecran du "PartLib" en cours d'edition */
/* Function to redraw the current loaded library component
*/
{
if
(
GetScreen
()
==
NULL
)
return
;
...
...
@@ -208,9 +211,9 @@ void WinEDA_LibeditFrame::RedrawActiveWindow( wxDC* DC, bool EraseBg )
DC
->
SetBackground
(
*
wxBLACK_BRUSH
);
DC
->
SetBackgroundMode
(
wxTRANSPARENT
);
GRResetPenAndBrush
(
DC
);
// reinit de la brosse et plume courante
GRResetPenAndBrush
(
DC
);
DrawPanel
->
CursorOff
(
DC
);
// e
ffacement curseu
r
DrawPanel
->
CursorOff
(
DC
);
// e
rase curso
r
if
(
DrawPanel
->
ManageCurseur
)
{
DrawPanel
->
ManageCurseur
(
DrawPanel
,
DC
,
FALSE
);
// effacement affichage lie au curseur
...
...
@@ -225,11 +228,11 @@ void WinEDA_LibeditFrame::RedrawActiveWindow( wxDC* DC, bool EraseBg )
DrawLibEntry
(
DrawPanel
,
DC
,
CurrentLibEntry
,
wxPoint
(
0
,
0
),
CurrentUnit
,
CurrentConvert
,
GR_DEFAULT_DRAWMODE
);
DrawPanel
->
CursorOn
(
DC
);
// re
affichage curseu
r
DrawPanel
->
CursorOn
(
DC
);
// re
draw curso
r
if
(
DrawPanel
->
ManageCurseur
)
{
DrawPanel
->
ManageCurseur
(
DrawPanel
,
DC
,
FALSE
);
// reaffichage lie au curseur
DrawPanel
->
ManageCurseur
(
DrawPanel
,
DC
,
FALSE
);
}
GetScreen
()
->
ClrRefreshReq
();
...
...
@@ -242,8 +245,8 @@ void WinEDA_LibeditFrame::RedrawActiveWindow( wxDC* DC, bool EraseBg )
void
WinEDA_LibeditFrame
::
SaveActiveLibrary
()
/*************************************************/
/* Sa
uvegarde en fichier la librairie pointee par CurrentLib
*
une sauvegarde en .bak de l'ancien fichier est egalement cree
/* Sa
ve (on disk) the current library
*
if exists the old file is renamed (.bak)
*/
{
wxString
Name
,
msg
;
...
...
@@ -321,8 +324,8 @@ void WinEDA_LibeditFrame::DeleteOnePart()
* alias deviennent dependants de celui ci.
*/
{
wxString
CmpName
;
int
NumOfParts
;
wxString
CmpName
;
int
NumOfParts
;
EDA_LibComponentStruct
*
LibEntry
;
WinEDAListBox
*
ListBox
;
const
wxChar
**
ListNames
;
...
...
@@ -365,7 +368,7 @@ void WinEDA_LibeditFrame::DeleteOnePart()
}
ListBox
=
new
WinEDAListBox
(
this
,
msg
,
ListNames
,
wxEmptyString
,
NULL
,
wxColour
(
255
,
255
,
255
)
);
wxColour
(
255
,
255
,
255
)
);
int
ii
=
ListBox
->
ShowModal
();
...
...
@@ -407,7 +410,7 @@ void WinEDA_LibeditFrame::CreateNewLibraryPart()
int
diag
;
if
(
CurrentLibEntry
&&
!
IsOK
(
this
,
_
(
"Clear old component from screen (changes will be lost)?"
)
)
)
&&
!
IsOK
(
this
,
_
(
"Clear old component from screen (changes will be lost)?"
)
)
)
return
;
CurrentDrawItem
=
NULL
;
...
...
@@ -429,8 +432,8 @@ void WinEDA_LibeditFrame::CreateNewLibraryPart()
{
wxString
msg
;
msg
<<
_
(
"Component
\"
"
)
<<
Dialogbox
.
ReturnCmpName
()
<<
_
(
"
\"
exists in library
\"
"
)
<<
CurrentLib
->
m_Name
<<
_
(
"
\"
."
);
_
(
"
\"
exists in library
\"
"
)
<<
CurrentLib
->
m_Name
<<
_
(
"
\"
."
);
DisplayError
(
this
,
msg
);
return
;
}
...
...
@@ -485,7 +488,7 @@ void WinEDA_LibeditFrame::DeletePartInLib( LibraryStruct* Library,
if
(
Entry
->
Type
==
ALIAS
)
{
RootEntry
=
FindLibPart
(
(
(
EDA_LibCmpAliasStruct
*
)
Entry
)
->
m_RootName
.
GetData
(),
(
(
EDA_LibCmpAliasStruct
*
)
Entry
)
->
m_RootName
.
GetData
(),
Library
->
m_Name
,
FIND_ROOT
);
/* Remove alias name from the root component alias list */
if
(
RootEntry
==
NULL
)
...
...
@@ -539,7 +542,7 @@ void WinEDA_LibeditFrame::DeletePartInLib( LibraryStruct* Library,
{
wxString
msg
;
msg
.
Printf
(
wxT
(
"Warning: Alias <%s> not found"
),
AliasName
.
GetData
()
);
AliasName
.
GetData
()
);
DisplayError
(
this
,
msg
,
30
);
}
else
...
...
@@ -576,18 +579,20 @@ void WinEDA_LibeditFrame::DeletePartInLib( LibraryStruct* Library,
Library
->
m_Name
,
FIND_ALIAS
);
if
(
AliasEntry
==
NULL
)
{
// Should not occurs. If happens, this is an error (or bug)
{
// Should not occurs. If happens, this is an error (or bug)
wxString
msg
;
msg
.
Printf
(
wxT
(
"Warning: Alias <%s> not found"
),
AliasName
.
GetData
()
);
AliasName
.
GetData
()
);
DisplayError
(
this
,
msg
,
30
);
continue
;
}
if
(
AliasEntry
->
Type
!=
ALIAS
)
{
// Should not occurs. If happens, this is an error (or bug)
{
// Should not occurs. If happens, this is an error (or bug)
wxString
msg
;
msg
.
Printf
(
wxT
(
"Warning: <%s> is not an Alias"
),
AliasName
.
GetData
()
);
AliasName
.
GetData
()
);
DisplayError
(
this
,
msg
,
30
);
continue
;
}
...
...
@@ -635,7 +640,7 @@ void WinEDA_LibeditFrame::SaveOnePartInMemory()
CurrentLib
->
m_Name
,
FIND_ROOT
)
)
!=
NULL
)
{
msg
.
Printf
(
_
(
"Component
\"
%s
\"
exists. Change it?"
),
Entry
->
m_Name
.
m_Text
.
GetData
()
);
Entry
->
m_Name
.
m_Text
.
GetData
()
);
if
(
!
IsOK
(
this
,
msg
)
)
return
;
NewCmp
=
FALSE
;
...
...
@@ -685,6 +690,6 @@ void WinEDA_LibeditFrame::SaveOnePartInMemory()
}
msg
.
Printf
(
_
(
"Component %s saved in %s"
),
Entry
->
m_Name
.
m_Text
.
GetData
(),
CurrentLib
->
m_Name
.
GetData
()
);
Entry
->
m_Name
.
m_Text
.
GetData
(),
CurrentLib
->
m_Name
.
GetData
()
);
Affiche_Message
(
msg
);
}
internat/fr/kicad.mo
View file @
6431e9c9
No preview for this file type
internat/fr/kicad.po
View file @
6431e9c9
This diff is collapsed.
Click to expand it.
libs.win
View file @
6431e9c9
...
...
@@ -22,9 +22,9 @@ DEBUG = 0
#Define the wxWidget path (if not found in environment variables):
ifndef WXWIN
ifeq ($(DEBUG), 1)
WXWIN=
f:/wxMSW-2.8.910-rc2
/Debug
WXWIN=
d:/wxMSW-2.8.10
/Debug
else
WXWIN=
f:/wxMSW-2.8.10-rc2
/Release
WXWIN=
d:/wxMSW-2.8.10
/Release
endif
endif
LIBVERSION = 2.8
...
...
pcbnew/dialog_print_using_printer.cpp
View file @
6431e9c9
This diff is collapsed.
Click to expand it.
pcbnew/pcbplot.cpp
View file @
6431e9c9
...
...
@@ -732,6 +732,11 @@ void WinEDA_PlotFrame::Plot( wxCommandEvent& event )
}
}
// If no layer selected, we have no plot. prompt user if it happens
// because he could think there is a bug in pcbnew:
if
(
s_SelectedLayers
==
0
)
DisplayError
(
this
,
_
(
"No layer selected"
)
);
// Close(true);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment