forked from qt-creator/qt-creator
CMakePM: Allow "Force to ..." context menu entries also for keys
Previously the "Force to ..." context menu entries were enabled only for the items on the second column (values). There is no reason not to have the same behavior for the items on the first column (keys). This way the user doesn't have the impression that something is wrong if they trigger the context menu on the key and not on the value in the list. Change-Id: I02fcaf25340f2dbcbb808be8f27047acaaee5471 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -125,7 +125,7 @@ bool ConfigModel::hasChanges() const
|
||||
|
||||
bool ConfigModel::canForceTo(const QModelIndex &idx, const ConfigModel::DataItem::Type type) const
|
||||
{
|
||||
if (idx.model() != const_cast<ConfigModel *>(this) || idx.column() != 1)
|
||||
if (idx.model() != const_cast<ConfigModel *>(this))
|
||||
return false;
|
||||
Utils::TreeItem *item = itemForIndex(idx);
|
||||
auto cmti = dynamic_cast<Internal::ConfigModelTreeItem *>(item);
|
||||
|
||||
Reference in New Issue
Block a user