Skip to content

Commit

Permalink
#5750: Remove old grid commands from texture tool
Browse files Browse the repository at this point in the history
  • Loading branch information
codereader committed Sep 25, 2021
1 parent ed14e42 commit 6658303
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 33 deletions.
4 changes: 2 additions & 2 deletions install/user.xml
Expand Up @@ -299,8 +299,8 @@
<toolbutton name="findandreplace" action="FindReplaceTextures" tooltip="Find &amp; Replace" icon="texwindow_findandreplace.png"/>
</toolbar>
<toolbar name="textool" align="horizontal">
<toolbutton name="griddown" action="TexToolGridDown" tooltip="Decrease Grid Size" icon="grid_down.png"/>
<toolbutton name="gridup" action="TexToolGridUp" tooltip="Increase Grid Size" icon="grid_up.png"/>
<toolbutton name="griddown" action="GridDown" tooltip="Decrease Grid Size" icon="grid_down.png"/>
<toolbutton name="gridup" action="GridUp" tooltip="Increase Grid Size" icon="grid_up.png"/>
<toolbutton name="gridsnap" action="TexToolSnapToGrid" tooltip="Snap to Grid" icon="grid_snap.png"/>
<toggletoolbutton name="usegrid" action="TexToolToggleGrid" tooltip="Toggle Grid" icon="grid_toggle.png"/>
<separator/>
Expand Down
24 changes: 0 additions & 24 deletions radiant/textool/TexTool.cpp
Expand Up @@ -245,20 +245,6 @@ void TexTool::onSelectionModeChanged(textool::SelectionMode mode)
queueDraw();
}

void TexTool::gridUp() {
if (_grid*2 <= GRID_MAX && _gridActive) {
_grid *= 2;
draw();
}
}

void TexTool::gridDown() {
if (_grid/2 >= GRID_MIN && _gridActive) {
_grid /= 2;
draw();
}
}

void TexTool::onMainFrameShuttingDown()
{
rMessage() << "TexTool shutting down." << std::endl;
Expand Down Expand Up @@ -881,14 +867,6 @@ void TexTool::toggle(const cmd::ArgumentList& args)
Instance().ToggleVisibility();
}

void TexTool::texToolGridUp(const cmd::ArgumentList& args) {
Instance().gridUp();
}

void TexTool::texToolGridDown(const cmd::ArgumentList& args) {
Instance().gridDown();
}

void TexTool::texToolSnapToGrid(const cmd::ArgumentList& args) {
Instance().snapToGrid();
}
Expand All @@ -912,8 +890,6 @@ void TexTool::selectRelated(const cmd::ArgumentList& args) {
void TexTool::registerCommands()
{
GlobalCommandSystem().addCommand("TextureTool", TexTool::toggle);
GlobalCommandSystem().addCommand("TexToolGridUp", TexTool::texToolGridUp);
GlobalCommandSystem().addCommand("TexToolGridDown", TexTool::texToolGridDown);
GlobalCommandSystem().addCommand("TexToolSnapToGrid", TexTool::texToolSnapToGrid);
GlobalCommandSystem().addCommand("TexToolMergeItems", TexTool::texToolMergeItems);
GlobalCommandSystem().addCommand("TexToolFlipS", TexTool::texToolFlipS);
Expand Down
7 changes: 0 additions & 7 deletions radiant/textool/TexTool.h
Expand Up @@ -192,11 +192,6 @@ class TexTool :
*/
void draw();

/** greebo: Increases/Decreases the grid size.
*/
void gridUp();
void gridDown();

// Idle callback, used for deferred updates
void onIdle(wxIdleEvent& ev);

Expand All @@ -220,8 +215,6 @@ class TexTool :
/** greebo: Static command targets
*/
static void toggle(const cmd::ArgumentList& args);
static void texToolGridUp(const cmd::ArgumentList& args);
static void texToolGridDown(const cmd::ArgumentList& args);
static void texToolSnapToGrid(const cmd::ArgumentList& args);
static void texToolMergeItems(const cmd::ArgumentList& args);
static void texToolFlipS(const cmd::ArgumentList& args);
Expand Down

0 comments on commit 6658303

Please sign in to comment.