pcbnew: Re-add missing user units python
When moving user user units out of the global, we missed that Python calls were using it. This re-adds a function to retrieve user units allowing the python scripts to show users dialogs in their preferred units.
This commit is contained in:
parent
69c1263c02
commit
b426b9e784
|
@ -146,6 +146,15 @@ void UpdateUserInterface()
|
|||
}
|
||||
|
||||
|
||||
int GetUserUnits()
|
||||
{
|
||||
if( s_PcbEditFrame )
|
||||
return s_PcbEditFrame->GetUserUnits();
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
bool IsActionRunning()
|
||||
{
|
||||
return ACTION_PLUGINS::IsActionRunning();
|
||||
|
|
|
@ -69,6 +69,12 @@ void WindowZoom( int xl, int yl, int width, int height );
|
|||
*/
|
||||
void UpdateUserInterface();
|
||||
|
||||
/**
|
||||
* Returns the currently selected user unit value for the interface
|
||||
* @return 0 = Inches, 1=mm, -1 if the frame isn't set
|
||||
*/
|
||||
int GetUserUnits();
|
||||
|
||||
/**
|
||||
* Are we currently in an action plugin?
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue