mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-18 17:40:48 +02:00
Hotkeys and multiselection
This commit is contained in:
parent
aa1cf5e16c
commit
ece811b508
@ -286,6 +286,9 @@
|
||||
<property name="mouseTracking">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::ClickFocus</enum>
|
||||
</property>
|
||||
<property name="editTriggers">
|
||||
<set>QAbstractItemView::NoEditTriggers</set>
|
||||
</property>
|
||||
@ -763,21 +766,33 @@
|
||||
<property name="text">
|
||||
<string>Open</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Ctrl+O</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionSave">
|
||||
<property name="text">
|
||||
<string>Save</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Ctrl+S</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionNew">
|
||||
<property name="text">
|
||||
<string>New</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Ctrl+N</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionSave_as">
|
||||
<property name="text">
|
||||
<string>Save as</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Ctrl+Shift+S</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionLevel">
|
||||
<property name="text">
|
||||
@ -796,16 +811,25 @@
|
||||
<property name="text">
|
||||
<string>Cut</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Ctrl+X</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionCopy">
|
||||
<property name="text">
|
||||
<string>Copy</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Ctrl+C</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionPaste">
|
||||
<property name="text">
|
||||
<string>Paste</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Ctrl+V</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionFill">
|
||||
<property name="text">
|
||||
|
@ -265,11 +265,18 @@ void MapView::mousePressEvent(QMouseEvent *event)
|
||||
{
|
||||
if(sc->selectionObjectsView.isSelected(obj))
|
||||
{
|
||||
sc->selectionObjectsView.selectionMode = 2;
|
||||
if(qApp->keyboardModifiers() & Qt::ControlModifier)
|
||||
{
|
||||
sc->selectionObjectsView.deselectObject(obj);
|
||||
sc->selectionObjectsView.selectionMode = 1;
|
||||
}
|
||||
else
|
||||
sc->selectionObjectsView.selectionMode = 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
sc->selectionObjectsView.clear();
|
||||
if(!(qApp->keyboardModifiers() & Qt::ControlModifier))
|
||||
sc->selectionObjectsView.clear();
|
||||
sc->selectionObjectsView.selectionMode = 2;
|
||||
sc->selectionObjectsView.selectObject(obj);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user