Skip to content

Commit

Permalink
#5750: Texture Tool is monitoring Grid size changes now
Browse files Browse the repository at this point in the history
  • Loading branch information
codereader committed Sep 25, 2021
1 parent dd8ff96 commit ed14e42
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions radiant/textool/TexTool.cpp
Expand Up @@ -128,6 +128,7 @@ void TexTool::_preHide()
_manipulatorChanged.disconnect();
_selectionModeChanged.disconnect();
_selectionChanged.disconnect();
_gridChanged.disconnect();

GlobalRadiantCore().getMessageBus().removeListener(_manipulatorModeToggleRequestHandler);
_manipulatorModeToggleRequestHandler = std::numeric_limits<std::size_t>::max();
Expand All @@ -147,6 +148,7 @@ void TexTool::_preShow()
_manipulatorChanged.disconnect();
_selectionModeChanged.disconnect();
_selectionChanged.disconnect();
_gridChanged.disconnect();

// Register self to the SelSystem to get notified upon selection changes.
_sceneSelectionChanged = GlobalSelectionSystem().signal_selectionChanged().connect(
Expand Down Expand Up @@ -177,6 +179,8 @@ void TexTool::_preShow()
sigc::mem_fun(this, &TexTool::queueDraw)
);

_gridChanged = GlobalGrid().signal_gridChanged().connect(sigc::mem_fun(this, &TexTool::queueDraw));

// Trigger an update of the current selection
_selectionRescanNeeded = true;
queueDraw();
Expand Down
1 change: 1 addition & 0 deletions radiant/textool/TexTool.h
Expand Up @@ -78,6 +78,7 @@ class TexTool :
sigc::connection _manipulatorChanged;
sigc::connection _selectionModeChanged;
sigc::connection _selectionChanged;
sigc::connection _gridChanged;
std::size_t _manipulatorModeToggleRequestHandler;
std::size_t _componentSelectionModeToggleRequestHandler;

Expand Down

0 comments on commit ed14e42

Please sign in to comment.