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