Skip to content
This repository has been archived by the owner on Jun 16, 2019. It is now read-only.

Commit

Permalink
Possible fix for Misc menu, Select Entity Color... not working at times
Browse files Browse the repository at this point in the history
In GtkRadiant v1.2.13 and v1.4 I had noticed a situation where the
K-key (Misc menu, Select Entity Color...) would not work on selected
light entities... the menu entry was ghosted out.

This also occurred in v1.6.x. To fix this the selected light entity
(without _color key) needed to get a manually set "_color 1 1 1"
key/value pair... then suddenly the Misc menu, Select Entity Color...
entry became unghosted.

Alas after this manual fix I was not able to reproduce the issue.

Possible Fix:
The rare issue could be related to the menu code using the
wrong m_strMenu variable as defined in the g_Commands[] section:

  menu_misc_select_entitycolor

Fixed the menu code from

  g_object_set_data(G_OBJECT(window), "menu_misc_selectentitycolor", item);

to the above.

Hopefully this actually permanently fixes the issue.
(cherry picked from commit 5baf036)

Reworked original patch to not include the other, unrelated changes.
  • Loading branch information
AEonZR authored and mfn committed Jan 17, 2010
1 parent 40e603a commit 4fd39b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion radiant/mainframe.cpp
Expand Up @@ -1489,7 +1489,7 @@ void MainFrame::create_main_menu (GtkWidget *window, GtkWidget *vbox)
create_menu_item_with_mnemonic (menu, _("_Print XY View"), GTK_SIGNAL_FUNC (HandleCommand), ID_MISC_PRINTXY);
item = create_menu_item_with_mnemonic (menu, _("_Select Entity Color..."),
GTK_SIGNAL_FUNC (HandleCommand), ID_MISC_SELECTENTITYCOLOR);
g_object_set_data (G_OBJECT (window), "menu_misc_selectentitycolor", item);
g_object_set_data (G_OBJECT (window), "menu_misc_select_entitycolor", item);

// Region menu
menu = create_sub_menu_with_mnemonic (menu_bar, _("_Region"));
Expand Down

0 comments on commit 4fd39b6

Please sign in to comment.