Free cookie consent management tool by TermsFeed Policy Generator

Changeset 918 for trunk/sources


Ignore:
Timestamp:
12/07/08 12:42:29 (16 years ago)
Author:
gkronber
Message:

fixed #421 (Right-click in the Pluginmanager Console causes NullReferenceException) and related issues.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.PluginInfrastructure.GUI/ManagerForm.cs

    r854 r918  
    991991      // per default the treeview doesn't select nodes on right click
    992992      if(e.Button == MouseButtons.Right) {
    993         listView.GetItemAt(e.X, e.Y).Selected = true;
     993        ListViewItem clickedItem = listView.GetItemAt(e.X, e.Y);
     994        if (clickedItem != null) {
     995          // clear previous selection
     996          while (listView.SelectedItems.Count > 0)
     997            listView.SelectedItems[0].Selected = false;
     998          // select clicked item
     999          clickedItem.Selected = true;
     1000        }
    9941001      }
    9951002    }
     
    10001007        // display the plugin details in the lower pane
    10011008        DisplayPluginInfo(((PluginTag)e.Item.Tag).GetPluginDetails());
    1002       } else {
     1009      } else if(e.Item.Tag!=null) {
    10031010        // when an item was 'unselected' or was selected but doesn't represent a plugin then install and remove are not possible
    10041011        publishButton.Enabled = false;
    10051012        installButton.Enabled = false;
    10061013        deleteButton.Enabled = false;
     1014        publishMenuItem.Enabled = false;
     1015        installMenuItem.Enabled = false;
     1016        deleteMenuItem.Enabled = false;
    10071017      }
    10081018    }
Note: See TracChangeset for help on using the changeset viewer.