Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
When you try to save categories of a themeless map in Windows, nothing
happens. Let's disable instead since it's not meaningful.
  • Loading branch information
lixun910 committed Feb 24, 2017
1 parent 88968e3 commit bce4c82
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions Explore/MapNewView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -774,7 +774,12 @@ void MapCanvas::DisplayRightClickMenu(const wxPoint& pos)
TemplateCanvas::AppendCustomCategories(optMenu,
project->GetCatClassifManager());
SetCheckMarks(optMenu);


GeneralWxUtils::EnableMenuItem(optMenu, XRCID("ID_SAVE_CATEGORIES"),
GetCcType() != CatClassification::no_theme);



if (template_frame) {
template_frame->UpdateContextMenuItems(optMenu);
template_frame->PopupMenu(optMenu, pos + GetPosition());
Expand Down Expand Up @@ -807,8 +812,8 @@ void MapCanvas::SetCheckMarks(wxMenu* menu)
// following menu items if they were specified for this particular
// view in the xrc file. Items that cannot be enable/disabled,
// or are not checkable do not appear.
GeneralWxUtils::CheckMenuItem(menu, XRCID("ID_MAPANALYSIS_THEMELESS"),

GeneralWxUtils::CheckMenuItem(menu, XRCID("ID_MAPANALYSIS_THEMELESS"),
GetCcType() == CatClassification::no_theme);

// since XRCID is a macro, we can't make this into a loop
Expand Down

0 comments on commit bce4c82

Please sign in to comment.