mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-01 21:56:43 +08:00
refs #720, remove highlight DB data menu (we use the DB icon instead)
* removed menu item * fixed menu action, so parents submenus are searched upwards
This commit is contained in:
committed by
Mathew Sutcliffe
parent
009bfc3ed1
commit
a8834d0511
@@ -92,28 +92,9 @@ namespace BlackGui
|
||||
template <class ModelClass, class ContainerType, class ObjectType, class KeyType>
|
||||
void CViewWithDbObjects<ModelClass, ContainerType, ObjectType, KeyType>::customMenu(Menus::CMenuActions &menuActions)
|
||||
{
|
||||
if (this->m_menus.testFlag(CViewBaseNonTemplate::MenuHighlightDbData))
|
||||
{
|
||||
if (!this->m_menuFlagActions.contains(CViewBaseNonTemplate::MenuHighlightDbData))
|
||||
{
|
||||
CMenuActions ma;
|
||||
QAction *added = ma.addAction(CIcons::database16(), "Highlight DB data", CMenuAction::pathViewDatabase(), { this, &CViewWithDbObjects<ModelClass, ContainerType, ObjectType, KeyType>::ps_toggleHighlightDbData });
|
||||
added->setCheckable(true);
|
||||
this->m_menuFlagActions.insert(CViewBaseNonTemplate::MenuHighlightDbData, ma);
|
||||
}
|
||||
QAction *a = menuActions.addActions(this->initMenuActions(CViewBaseNonTemplate::MenuHighlightDbData)).first();
|
||||
a->setChecked(this->derivedModel()->highlightDbData());
|
||||
}
|
||||
CViewBase<ModelClass, ContainerType, ObjectType>::customMenu(menuActions);
|
||||
}
|
||||
|
||||
template <class ModelClass, class ContainerType, class ObjectType, class KeyType>
|
||||
void CViewWithDbObjects<ModelClass, ContainerType, ObjectType, KeyType>::ps_toggleHighlightDbData()
|
||||
{
|
||||
bool h = this->derivedModel()->highlightDbData();
|
||||
this->derivedModel()->setHighlightDbData(!h);
|
||||
}
|
||||
|
||||
template <class ModelClass, class ContainerType, class ObjectType, class KeyType>
|
||||
COrderableViewWithDbObjects<ModelClass, ContainerType, ObjectType, KeyType>::COrderableViewWithDbObjects(QWidget *parent) :
|
||||
CViewWithDbObjects<ModelClass, ContainerType, ObjectType, KeyType>::CViewWithDbObjects(parent)
|
||||
|
||||
Reference in New Issue
Block a user