Skip to content

Commit

Permalink
fix shortcuts, new icon
Browse files Browse the repository at this point in the history
  • Loading branch information
Labauke committed Sep 20, 2022
1 parent f22fe1b commit c4af611
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions SIM-VICUS/resources/SIM-VICUS.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -112,5 +112,6 @@
<file>gfx/actions/NetworkGeo.png</file>
<file>gfx/actions/copy_building.png</file>
<file>gfx/actions/misc_operations.png</file>
<file>gfx/actions/SmartSelect.png</file>
</qresource>
</RCC>
Binary file added SIM-VICUS/resources/gfx/actions/SmartSelect.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions SIM-VICUS/src/SVMainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ SVMainWindow::SVMainWindow(QWidget * /*parent*/) :
// manually specify keyboard shortcut again, since on Windows this is a "standard shortcut" and get's removed
// when setting up UI
m_ui->actionFileClose->setShortcut(QKeySequence((int)Qt::CTRL + Qt::Key_W));
m_ui->actionViewFindSelectedGeometry->setShortcut(QKeySequence((int)Qt::CTRL + Qt::Key_F));

// enforce using a native window; we need this so we can call window() and retrieve scaling information
setAttribute(Qt::WA_NativeWindow);
Expand Down
4 changes: 4 additions & 0 deletions SIM-VICUS/src/SVNavigationTreeWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ SVNavigationTreeWidget::SVNavigationTreeWidget(QWidget *parent) :
m_ui->treeWidget->setItemDelegate(m_navigationTreeItemDelegate);
m_ui->treeWidget->setUniformRowHeights(true);

m_ui->actionSmartSelect->setShortcut(QKeySequence((int)Qt::CTRL + Qt::Key_Period));
m_ui->actionInvertSelection->setShortcut(QKeySequence((int)Qt::CTRL + Qt::Key_I));


connect(&SVProjectHandler::instance(), &SVProjectHandler::modified,
this, &SVNavigationTreeWidget::onModified);

Expand Down
2 changes: 1 addition & 1 deletion SIM-VICUS/src/SVNavigationTreeWidget.ui
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@
<action name="actionSmartSelect">
<property name="icon">
<iconset resource="../resources/SIM-VICUS.qrc">
<normaloff>:/gfx/actions/24x24/arrow.png</normaloff>:/gfx/actions/24x24/arrow.png</iconset>
<normaloff>:/gfx/actions/SmartSelect.png</normaloff>:/gfx/actions/SmartSelect.png</iconset>
</property>
<property name="text">
<string>Smart select</string>
Expand Down

0 comments on commit c4af611

Please sign in to comment.