Fix Validate hiding overloaded virtual in 3D viewer dialog
This commit is contained in:
parent
71263c32e8
commit
b9abcc309f
|
@ -3,6 +3,7 @@
|
|||
*
|
||||
* Copyright (C) 2016 Mario Luzeiro <mrluzeiro@ua.pt>
|
||||
* Copyright (C) 2015 Cirilo Bernardo <cirilo.bernardo@gmail.com>
|
||||
* Copyright (C) 2015-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
|
||||
|
@ -665,7 +666,7 @@ void PANEL_PREV_3D::getOrientationVars( SGPOINT& aScale, SGPOINT& aRotation, SGP
|
|||
}
|
||||
|
||||
|
||||
bool PANEL_PREV_3D::Validate( wxString& aErrorMessage )
|
||||
bool PANEL_PREV_3D::ValidateWithMessage( wxString& aErrorMessage )
|
||||
{
|
||||
bool invalidScale = false;
|
||||
#define MIN_SCALE 0.001
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
*
|
||||
* Copyright (C) 2016 Mario Luzeiro <mrluzeiro@ua.pt>
|
||||
* Copyright (C) 2015 Cirilo Bernardo <cirilo.bernardo@gmail.com>
|
||||
* Copyright (C) 2015-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
|
||||
|
@ -99,7 +100,13 @@ public:
|
|||
* @return false if one (or more) value is not acceptable.
|
||||
* @param aErrorMessage is a wxString to store error messages, if any
|
||||
*/
|
||||
bool Validate( wxString& aErrorMessage );
|
||||
bool ValidateWithMessage( wxString& aErrorMessage );
|
||||
|
||||
bool Validate() override
|
||||
{
|
||||
wxString temp;
|
||||
return ValidateWithMessage(temp);
|
||||
}
|
||||
|
||||
private:
|
||||
wxString currentModelFile; ///< Used to check if the model file was changed
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
* Copyright (C) 2016 Mario Luzeiro <mrluzeiro@ua.pt>
|
||||
* Copyright (C) 2015 Jean-Pierre Charras, jp.charras at wanadoo.fr
|
||||
* Copyright (C) 2015 Dick Hollenbeck, dick@softplc.com
|
||||
* Copyright (C) 2004-2016 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
|
||||
|
@ -729,7 +729,7 @@ bool DIALOG_MODULE_BOARD_EDITOR::TransferDataFromWindow()
|
|||
// This will update the S3D_INFO list into the current module
|
||||
msg.Clear();
|
||||
|
||||
if( !m_PreviewPane->Validate( msg ) ) // Verify the validity of 3D parameters
|
||||
if( !m_PreviewPane->ValidateWithMessage( msg ) )
|
||||
{
|
||||
DisplayError( this, msg );
|
||||
return false;
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
* Copyright (C) 2015 Jean-Pierre Charras, jp.charras at wanadoo.fr
|
||||
* Copyright (C) 2015 Dick Hollenbeck, dick@softplc.com
|
||||
* Copyright (C) 2008-2015 Wayne Stambaugh <stambaughw@verizon.net>
|
||||
* Copyright (C) 2004-2015 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
|
||||
|
@ -461,7 +461,7 @@ void DIALOG_MODULE_MODULE_EDITOR::OnOkClick( wxCommandEvent& event )
|
|||
}
|
||||
}
|
||||
|
||||
if( !m_PreviewPane->Validate( msg ) ) // Verify the validity of 3D parameters
|
||||
if( !m_PreviewPane->ValidateWithMessage( msg ) )
|
||||
{
|
||||
DisplayError( NULL, msg );
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue