Skip to content

Commit

Permalink
Merge pull request TrenchBroom#4202 from TrenchBroom/4152-update-undo…
Browse files Browse the repository at this point in the history
…-on-focus-change

4152: Update undo on focus change
  • Loading branch information
kduske authored Jan 31, 2023
2 parents 68c076a + 00bc697 commit bcf8799
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions common/src/View/MapFrame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2360,13 +2360,13 @@ void MapFrame::debugShowPalette()

void MapFrame::focusChange(QWidget* /* oldFocus */, QWidget* newFocus)
{
auto newMapView = dynamic_cast<MapViewBase*>(newFocus);
if (newMapView != nullptr)
if (auto* newMapView = dynamic_cast<MapViewBase*>(newFocus))
{
m_currentMapView = newMapView;
}

updateActionState();
updateUndoRedoActions();
}

MapViewBase* MapFrame::currentMapViewBase()
Expand Down

0 comments on commit bcf8799

Please sign in to comment.