Skip to content

Commit

Permalink
Merge pull request #500 from jongough/updates
Browse files Browse the repository at this point in the history
Update PIL selectable after move of either start or end point
  • Loading branch information
jongough authored Dec 30, 2021
2 parents d6a2183 + f3ac062 commit c548f16
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ set(PACKAGE "ocpn_draw")

set(VERSION_MAJOR "1")
set(VERSION_MINOR "8")
set(VERSION_PATCH "11")
set(VERSION_PATCH "12")
set(VERSION_TWEAK "0")
set(VERSION_DATE "18/12/2021") # DD/MM/YYYY format
set(VERSION_DATE "30/12/2021") # DD/MM/YYYY format
set(OCPN_MIN_VERSION "ov50")
set(OCPN_API_VERSION_MAJOR "1")
set(OCPN_API_VERSION_MINOR "16")
Expand Down
13 changes: 11 additions & 2 deletions src/ocpn_draw_pi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2392,23 +2392,32 @@ bool ocpn_draw_pi::MouseEventHook( wxMouseEvent &event )
m_bODPointEditing = FALSE;
m_pCurrentCursor = NULL;
m_pSelectedPath->m_bIsBeingEdited = FALSE;
bool l_bUpdateSelect = false;
if( m_pFoundODPoint ) {
//g_pODSelect->UpdateSelectablePathSegments( m_pFoundODPoint );
m_pFoundODPoint->m_bIsBeingEdited = false;
m_pFoundODPoint->m_bPtIsSelected = false;
if(m_pSelectedEBL)
if(m_pSelectedEBL) {
m_pSelectedEBL->MoveEndPoint();
if(m_pSelectedPIL)
l_bUpdateSelect = true;
}
if(m_pSelectedPIL) {
m_pSelectedPIL->MoveEndPoint();
l_bUpdateSelect = true;
}
}
if(m_pSelectedPath->m_sTypeString == wxT("Guard Zone")) {
m_pSelectedGZ->UpdateGZSelectablePath();
l_bUpdateSelect = true;
} else if (m_pSelectedPIL) {
m_pSelectedPIL->UpdatePIL();
l_bUpdateSelect = true;
} else {
if(m_pSelectedPath->m_sTypeString == wxT("Boundary")) {
m_pSelectedPath->m_bPathPropertiesBlink = false;
}
}
if(l_bUpdateSelect) {
g_pODSelect->DeleteAllSelectablePathSegments( m_pSelectedPath );
g_pODSelect->DeleteAllSelectableODPoints( m_pSelectedPath );
g_pODSelect->AddAllSelectablePathSegments( m_pSelectedPath );
Expand Down

0 comments on commit c548f16

Please sign in to comment.