* shader editor: save on ctrl + s

This commit is contained in:
Garux
2025-08-06 15:51:43 +05:00
parent db756dc039
commit 222f1557fc
2 changed files with 14 additions and 2 deletions
+1
View File
@@ -1126,6 +1126,7 @@ misc...
add RBSP, FBSP support
* bobToolz: new Aperture Door builder
* .def .ent .fgd can be used simultaneously (removed entityclass="halflife")
* shader editor: save on ctrl + s
+13 -2
View File
@@ -605,7 +605,7 @@ retry:
ctrl+d duplicate line, selection
find and replace
f3, shift+f3, ctrl+f
ctrl+s
ctrl+s
move selected text block with alt+arrows
move line up/dn too
ctrl+x to cut whole line
@@ -2361,7 +2361,7 @@ class TextEditor : public QObject
if( ret == EMessageBoxReturn::eIDYES ){
editor_save();
}
if( ret == EMessageBoxReturn::eIDNO ){ // discard changes
else if( ret == EMessageBoxReturn::eIDNO ){ // discard changes
m_textView->clear(); // unset isModified flag this way to avoid messagebox on next opening
}
else if( ret == EMessageBoxReturn::eIDCANCEL ){
@@ -2411,6 +2411,17 @@ protected:
return true;
}
}
// save
if( event->type() == QEvent::ShortcutOverride ){
QKeyEvent *keyEvent = static_cast<QKeyEvent *>( event );
if( keyEvent == QKeySequence::StandardKey::Save ){
if( !keyEvent->isAutoRepeat() && m_textView->document()->isModified() ){
editor_save();
}
event->accept();
return true;
}
}
return QObject::eventFilter( obj, event ); // standard event processing
}
};