mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-17 04:51:52 +00:00
Make group selection optional.
--HG-- branch : dfighter-tools
This commit is contained in:
parent
08b6675b3d
commit
d7d62e690c
5 changed files with 21 additions and 1 deletions
|
@ -517,6 +517,8 @@ namespace NLGUI
|
|||
|
||||
CInterfaceElement* addWidgetToGroup( std::string &group, std::string &widgetClass, std::string &widgetName );
|
||||
|
||||
void setGroupSelection( bool b ){ groupSelection = b; }
|
||||
|
||||
private:
|
||||
CWidgetManager();
|
||||
~CWidgetManager();
|
||||
|
@ -610,6 +612,7 @@ namespace NLGUI
|
|||
|
||||
|
||||
std::string currentEditorSelection;
|
||||
bool groupSelection;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -2408,7 +2408,7 @@ namespace NLGUI
|
|||
// This may happen when alt-tab has been used => the sheet is dragged but the left button is up
|
||||
if (!CCtrlDraggable::getDraggedSheet())
|
||||
{
|
||||
if( CInterfaceElement::getEditorMode() )
|
||||
if( CInterfaceElement::getEditorMode() && groupSelection )
|
||||
{
|
||||
for( sint32 i = _GroupsUnderPointer.size() - 1; i >= 0; i-- )
|
||||
{
|
||||
|
@ -3516,6 +3516,7 @@ namespace NLGUI
|
|||
setScreenWH( 0, 0 );
|
||||
|
||||
currentEditorSelection = "";
|
||||
groupSelection = false;
|
||||
}
|
||||
|
||||
CWidgetManager::~CWidgetManager()
|
||||
|
|
|
@ -130,5 +130,10 @@ namespace GUIEditor
|
|||
e->setActive( false );
|
||||
e->setActive( true );
|
||||
}
|
||||
|
||||
void CEditorMessageProcessor::onSetGroupSelection( bool b )
|
||||
{
|
||||
CWidgetManager::getInstance()->setGroupSelection( b );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -38,6 +38,7 @@ namespace GUIEditor
|
|||
public Q_SLOTS:
|
||||
void onDelete();
|
||||
void onAdd( const QString &parentGroup, const QString &widgetType, const QString &name );
|
||||
void onSetGroupSelection( bool b );
|
||||
|
||||
private:
|
||||
CWidgetInfoTree *tree;
|
||||
|
|
|
@ -399,6 +399,16 @@ namespace GUIEditor
|
|||
connect( a, SIGNAL( triggered( bool ) ), this, SLOT( onAddWidgetClicked() ) );
|
||||
m->addAction( a );
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------------
|
||||
m->addSeparator();
|
||||
|
||||
a = new QAction( "Select groups", this );
|
||||
a->setCheckable( true );
|
||||
a->setChecked( false );
|
||||
connect( a, SIGNAL( triggered( bool ) ), messageProcessor, SLOT( onSetGroupSelection( bool ) ) );
|
||||
m->addAction( a );
|
||||
|
||||
menu = m;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue