Skip to content

Commit

Permalink
#5623: Show the dialog when the menu item is selected, instead of tog…
Browse files Browse the repository at this point in the history
…gling it
  • Loading branch information
codereader committed May 31, 2021
1 parent 899ac8f commit a0c15c3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 11 deletions.
2 changes: 1 addition & 1 deletion radiant/ui/UserInterfaceModule.cpp
Expand Up @@ -364,7 +364,7 @@ void UserInterfaceModule::registerUICommands()
GlobalCommandSystem().addCommand("ToggleLightInspector", LightInspector::toggleInspector);
GlobalCommandSystem().addCommand("SurfaceInspector", SurfaceInspector::toggle);
GlobalCommandSystem().addCommand("PatchInspector", PatchInspector::toggle);
GlobalCommandSystem().addCommand("MergeControlDialog", MergeControlDialog::Toggle);
GlobalCommandSystem().addCommand("MergeControlDialog", MergeControlDialog::ShowDialog);
GlobalCommandSystem().addCommand("OverlayDialog", OverlayDialog::toggle);
GlobalCommandSystem().addCommand("TransformDialog", TransformDialog::toggle);

Expand Down
10 changes: 2 additions & 8 deletions radiant/ui/merge/MergeControlDialog.cpp
Expand Up @@ -102,9 +102,9 @@ void MergeControlDialog::onMainFrameShuttingDown()
InstancePtr().reset();
}

void MergeControlDialog::Toggle(const cmd::ArgumentList& args)
void MergeControlDialog::ShowDialog(const cmd::ArgumentList& args)
{
Instance().ToggleVisibility();
Instance().Show();
}

void MergeControlDialog::convertTextCtrlToPathEntry(const std::string& ctrlName)
Expand Down Expand Up @@ -245,11 +245,6 @@ void MergeControlDialog::_preShow()
updateControlSensitivity();
}

void MergeControlDialog::rescanSelection()
{

}

void MergeControlDialog::selectionChanged(const scene::INodePtr& node, bool isComponent)
{
if (node->getNodeType() != scene::INode::Type::MergeAction)
Expand All @@ -270,7 +265,6 @@ void MergeControlDialog::onIdle(wxIdleEvent& ev)
if (!_updateNeeded) return;

_updateNeeded = false;
rescanSelection();
updateControlSensitivity();
}

Expand Down
3 changes: 1 addition & 2 deletions radiant/ui/merge/MergeControlDialog.h
Expand Up @@ -30,7 +30,7 @@ class MergeControlDialog :
static MergeControlDialog& Instance();

// The command target
static void Toggle(const cmd::ArgumentList& args);
static void ShowDialog(const cmd::ArgumentList& args);

/** greebo: SelectionSystem::Observer implementation. Gets called by
* the SelectionSystem upon selection change to allow updating of the
Expand All @@ -53,7 +53,6 @@ class MergeControlDialog :
void onAbortMerge(wxCommandEvent& ev);
void onRejectSelection(wxCommandEvent& ev);
void updateControlSensitivity();
void rescanSelection();
void queueUpdate();
void onIdle(wxIdleEvent& ev);
void onMapEvent(IMap::MapEvent ev);
Expand Down

0 comments on commit a0c15c3

Please sign in to comment.