Skip to content

Commit

Permalink
Gui: Add alignToSelection() icon and add to toolbar
Browse files Browse the repository at this point in the history
Co-authored-by: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com>
  • Loading branch information
Rexbas and maxwxyz committed May 13, 2024
1 parent 3fae3fa commit 491f4ea
Show file tree
Hide file tree
Showing 4 changed files with 152 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/Gui/CommandView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4079,16 +4079,16 @@ bool StdRecallWorkingView::isActive()
//===========================================================================
// Std_AlignToSelection
//===========================================================================

DEF_STD_CMD_A(StdCmdAlignToSelection)

StdCmdAlignToSelection::StdCmdAlignToSelection()
: Command("Std_AlignToSelection")
{
sGroup = "Standard-View";
sGroup = "View";
sMenuText = QT_TR_NOOP("Align to selection");
sToolTipText = QT_TR_NOOP("Align the view with the selection");
sWhatsThis = "Std_AlignToSelection";
sPixmap = "align-to-selection";
eType = Alter3DView;
}

Expand Down
148 changes: 148 additions & 0 deletions src/Gui/Icons/align-to-selection.svg
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 src/Gui/Icons/resource.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@
<file>colors.svg</file>
<file>px.svg</file>
<file>AddonManager.svg</file>
<file>align-to-selection.svg</file>
<file>Group.svg</file>
<file>Geofeaturegroup.svg</file>
<file>Geoassembly.svg</file>
Expand Down
2 changes: 1 addition & 1 deletion src/Gui/Workbench.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -810,7 +810,7 @@ ToolBarItem* StdWorkbench::setupToolBars() const
// View
auto view = new ToolBarItem( root );
view->setCommand("View");
*view << "Std_ViewFitAll" << "Std_ViewFitSelection" << "Std_ViewGroup"
*view << "Std_ViewFitAll" << "Std_ViewFitSelection" << "Std_ViewGroup" << "Std_AlignToSelection"
<< "Separator" << "Std_DrawStyle" << "Std_TreeViewActions"
<< "Separator" << "Std_MeasureDistance" << "Std_Measure";

Expand Down

0 comments on commit 491f4ea

Please sign in to comment.