mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 22:53:50 +00:00
Fix pathgrid selection mode not being removed from toolbar.
This commit is contained in:
parent
051aec2729
commit
8c5fddf150
2 changed files with 16 additions and 4 deletions
|
@ -35,10 +35,10 @@ namespace CSVRender
|
||||||
{
|
{
|
||||||
return QString(
|
return QString(
|
||||||
"Pathgrid editing"
|
"Pathgrid editing"
|
||||||
"<ul><li>Primary edit: Add node to scene</li>"
|
"<ul><li>Press {scene-edit-primary} to add a node to the cursor location</li>"
|
||||||
"<li>Secondary edit: Connect selected nodes to node</li>"
|
"<li>Press {scene-edit-secondary} to connect the selected nodes to the node beneath the cursor</li>"
|
||||||
"<li>Primary drag: Move selected nodes</li>"
|
"<li>Press {scene-edit-primary} and drag to move selected nodes</li>"
|
||||||
"<li>Secondary drag: Connect one node to another</li>"
|
"<li>Press {scene-edit-secondary} and drag to connect one node to another</li>"
|
||||||
"</ul><p>Note: Only a single cell's pathgrid may be edited at a time");
|
"</ul><p>Note: Only a single cell's pathgrid may be edited at a time");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -53,6 +53,16 @@ namespace CSVRender
|
||||||
toolbar->addTool(mSelectionMode);
|
toolbar->addTool(mSelectionMode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void PathgridMode::deactivate(CSVWidget::SceneToolbar* toolbar)
|
||||||
|
{
|
||||||
|
if (mSelectionMode)
|
||||||
|
{
|
||||||
|
toolbar->removeTool (mSelectionMode);
|
||||||
|
delete mSelectionMode;
|
||||||
|
mSelectionMode = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void PathgridMode::primaryEditPressed(const WorldspaceHitResult& hitResult)
|
void PathgridMode::primaryEditPressed(const WorldspaceHitResult& hitResult)
|
||||||
{
|
{
|
||||||
if (CSMPrefs::get()["3D Scene Input"]["context-select"].isTrue() &&
|
if (CSMPrefs::get()["3D Scene Input"]["context-select"].isTrue() &&
|
||||||
|
|
|
@ -19,6 +19,8 @@ namespace CSVRender
|
||||||
|
|
||||||
virtual void activate(CSVWidget::SceneToolbar* toolbar);
|
virtual void activate(CSVWidget::SceneToolbar* toolbar);
|
||||||
|
|
||||||
|
virtual void deactivate(CSVWidget::SceneToolbar* toolbar);
|
||||||
|
|
||||||
virtual void primaryEditPressed(const WorldspaceHitResult& hit);
|
virtual void primaryEditPressed(const WorldspaceHitResult& hit);
|
||||||
|
|
||||||
virtual void secondaryEditPressed(const WorldspaceHitResult& hit);
|
virtual void secondaryEditPressed(const WorldspaceHitResult& hit);
|
||||||
|
|
Loading…
Reference in a new issue