Skip to content

Commit

Permalink
Fix up messages about ODAPI
Browse files Browse the repository at this point in the history
If ODAPI is not available disable button not panel
  • Loading branch information
jongough committed Jul 14, 2018
1 parent 9028a1d commit 15921fe
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions src/testplugin_pi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -601,8 +601,8 @@ void testplugin_pi::GetODAPI()
if(!m_bODCreateBoundaryPoint) l_notavail.Append(_("OD_CreateBoundaryPoint\n"));
if(!m_bODCreateTextPoint) l_notavail.Append(_("OD_CreateTextPoint\n"));
if(l_notavail.Length() > 0) {
l_msg.Append(_("The following ODAPI's are not available:\m"));
l_msg.Append(l_avail);
l_msg.Append(_("The following ODAPI's are not available:\n"));
l_msg.Append(l_notavail);
}

OCPNMessageBox_PlugIn( m_parent_window, l_msg, _("TESTPLUGIN"), (long) wxYES );
Expand Down
18 changes: 9 additions & 9 deletions src/tpControlDialogImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ tpControlDialogImpl::tpControlDialogImpl( wxWindow* parent ) : tpControlDialogDe
m_bCreateBoundaryPointHasFocus = FALSE;
m_pfdDialog = NULL;

if(!g_testplugin_pi->m_bODCreateBoundary) m_panelUICreateBoundary->Disable();
if(!g_testplugin_pi->m_bODCreateBoundaryPoint) m_panelUICreateBoundaryPoint->Disable();
if(!g_testplugin_pi->m_bODCreateTextPoint) m_panelUICreateTextPoint->Disable();
if(!g_testplugin_pi->m_bODCreateBoundary) m_buttonCreateBoundaryODAPI->Disable();
if(!g_testplugin_pi->m_bODCreateBoundaryPoint) m_buttonCreateBoundaryPointODAPI->Disable();
if(!g_testplugin_pi->m_bODCreateTextPoint) m_buttonCreateTextPointODAPI->Disable();
if(g_testplugin_pi->m_fnOutputJSON == wxEmptyString) m_checkBoxSaveJSON->Disable();
else m_checkBoxSaveJSON->Enable();
}
Expand Down Expand Up @@ -788,12 +788,12 @@ void tpControlDialogImpl::SetDialogSize( void )

void tpControlDialogImpl::SetPanels()
{
if(g_testplugin_pi->m_bODCreateBoundary) m_panelUICreateBoundary->Enable();
else m_panelUICreateBoundary->Disable();
if(g_testplugin_pi->m_bODCreateBoundaryPoint) m_panelUICreateBoundaryPoint->Enable();
else m_panelUICreateBoundaryPoint->Disable();
if(g_testplugin_pi->m_bODCreateTextPoint) m_panelUICreateTextPoint->Enable();
else m_panelUICreateTextPoint->Disable();
if(g_testplugin_pi->m_bODCreateBoundary) m_buttonCreateBoundaryODAPI->Enable();
else m_buttonCreateBoundaryODAPI->Disable();
if(g_testplugin_pi->m_bODCreateBoundaryPoint) m_buttonCreateBoundaryPointODAPI->Enable();
else m_buttonCreateBoundaryPointODAPI->Disable();
if(g_testplugin_pi->m_bODCreateTextPoint) m_buttonCreateTextPointODAPI->Enable();
else m_buttonCreateTextPointODAPI->Disable();
}

wxString tpControlDialogImpl::GetJSONSaveFile( void )
Expand Down

0 comments on commit 15921fe

Please sign in to comment.