mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-23 23:56:15 +00:00
Merged in nimetu/ryzomcore/fix-issue-225 (pull request #98)
CGroupEditBox: ignore enter key when ctrl is pressed (ctrl+m combo) (issue #225)
This commit is contained in:
commit
a593a79989
2 changed files with 7 additions and 6 deletions
|
@ -999,7 +999,8 @@ namespace NLGUI
|
||||||
break;
|
break;
|
||||||
// OTHER
|
// OTHER
|
||||||
default:
|
default:
|
||||||
if ((rEDK.getChar() == KeyRETURN) && !_WantReturn)
|
bool isKeyRETURN = !rEDK.getKeyCtrl() && rEDK.getChar() == KeyRETURN;
|
||||||
|
if (isKeyRETURN && !_WantReturn)
|
||||||
{
|
{
|
||||||
// update historic.
|
// update historic.
|
||||||
if(_MaxHistoric)
|
if(_MaxHistoric)
|
||||||
|
@ -1030,9 +1031,9 @@ namespace NLGUI
|
||||||
// If the char is not alphanumeric -> return.
|
// If the char is not alphanumeric -> return.
|
||||||
// if(!isalnum(ec.Char))
|
// if(!isalnum(ec.Char))
|
||||||
// return
|
// return
|
||||||
if( (rEDK.getChar()>=32) || (rEDK.getChar() == KeyRETURN) )
|
if( (rEDK.getChar()>=32) || isKeyRETURN )
|
||||||
{
|
{
|
||||||
if (rEDK.getChar() == KeyRETURN)
|
if (isKeyRETURN)
|
||||||
{
|
{
|
||||||
ucstring copyStr= _InputString;
|
ucstring copyStr= _InputString;
|
||||||
if ((uint) std::count(copyStr.begin(), copyStr.end(), '\n') >= _MaxNumReturn)
|
if ((uint) std::count(copyStr.begin(), copyStr.end(), '\n') >= _MaxNumReturn)
|
||||||
|
@ -1049,7 +1050,7 @@ namespace NLGUI
|
||||||
cutSelection();
|
cutSelection();
|
||||||
}
|
}
|
||||||
|
|
||||||
ucchar c = (rEDK.getChar() == KeyRETURN)?'\n':rEDK.getChar();
|
ucchar c = isKeyRETURN ? '\n' : rEDK.getChar();
|
||||||
if (isFiltered(c)) return;
|
if (isFiltered(c)) return;
|
||||||
switch(_EntryType)
|
switch(_EntryType)
|
||||||
{
|
{
|
||||||
|
@ -1128,7 +1129,7 @@ namespace NLGUI
|
||||||
++ _CursorPos;
|
++ _CursorPos;
|
||||||
triggerOnChangeAH();
|
triggerOnChangeAH();
|
||||||
}
|
}
|
||||||
if (rEDK.getChar() == KeyRETURN)
|
if (isKeyRETURN)
|
||||||
{
|
{
|
||||||
CAHManager::getInstance()->runActionHandler(_AHOnEnter, this, _AHOnEnterParams);
|
CAHManager::getInstance()->runActionHandler(_AHOnEnter, this, _AHOnEnterParams);
|
||||||
}
|
}
|
||||||
|
|
|
@ -2207,7 +2207,7 @@ namespace NLGUI
|
||||||
}
|
}
|
||||||
|
|
||||||
// Manage complex "Enter"
|
// Manage complex "Enter"
|
||||||
if (eventDesc.getKeyEventType() == CEventDescriptorKey::keychar && eventDesc.getChar() == NLMISC::KeyRETURN)
|
if( eventDesc.getKeyEventType() == CEventDescriptorKey::keychar && eventDesc.getChar() == NLMISC::KeyRETURN && !eventDesc.getKeyCtrl() )
|
||||||
{
|
{
|
||||||
// If the top window has Enter AH
|
// If the top window has Enter AH
|
||||||
CInterfaceGroup *tw= getTopWindow();
|
CInterfaceGroup *tw= getTopWindow();
|
||||||
|
|
Loading…
Reference in a new issue