Skip to content

Commit

Permalink
#6514: "Choose source material" disabled for wildcard row
Browse files Browse the repository at this point in the history
The text entry was already disabled when the "*" row is selected; now
the browse button is also disabled.
  • Loading branch information
Matthew Mott committed Jul 2, 2024
1 parent b97b7df commit c0a5a24
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion radiant/ui/skin/SkinEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,8 @@ void SkinEditor::setupRemappingPanel()
_remappingList->EnableSearchPopup(false);

// Material browse buttons
getControl<wxBitmapButton>("chooseRemappedSourceMaterialBtn")->Bind(
_sourceMaterialBrowseBtn = getControl<wxBitmapButton>("chooseRemappedSourceMaterialBtn");
_sourceMaterialBrowseBtn->Bind(
wxEVT_BUTTON, [=](wxCommandEvent&) { chooseRemappedSourceMaterial(); }
);
getControl<wxBitmapButton>("chooseRemappedDestMaterialBtn")->Bind(
Expand Down Expand Up @@ -349,6 +350,7 @@ void SkinEditor::updateRemappingButtonSensitivity()
!selectedSource.empty() && !isWildcardRow
);
_sourceMaterialEdit->Enable(!isWildcardRow);
_sourceMaterialBrowseBtn->Enable(!isWildcardRow);
}

void SkinEditor::updateSourceView(const decl::ISkin::Ptr& skin)
Expand Down
2 changes: 2 additions & 0 deletions radiant/ui/skin/SkinEditor.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#pragma once

#include <sigc++/connection.h>
#include <wx/bmpbuttn.h>

#include "icommandsystem.h"
#include "modelskin.h"
Expand Down Expand Up @@ -70,6 +71,7 @@ class SkinEditor final: public wxutil::DialogBase, private wxutil::XmlResourceBa
wxutil::TreeView* _remappingList;
wxWeakRef<wxTextCtrl> _sourceMaterialEdit;
wxWeakRef<wxTextCtrl> _replacementMaterialEdit;
wxWeakRef<wxBitmapButton> _sourceMaterialBrowseBtn;

wxutil::WindowPosition _windowPosition;
wxutil::PanedPosition _leftPanePosition;
Expand Down

0 comments on commit c0a5a24

Please sign in to comment.