summaryrefslogtreecommitdiffstats
path: root/src/helper
diff options
context:
space:
mode:
Diffstat (limited to 'src/helper')
-rw-r--r--src/helper/action-context.cpp5
-rw-r--r--src/helper/action-context.h2
2 files changed, 1 insertions, 6 deletions
diff --git a/src/helper/action-context.cpp b/src/helper/action-context.cpp
index 648101540..36b6914d6 100644
--- a/src/helper/action-context.cpp
+++ b/src/helper/action-context.cpp
@@ -62,11 +62,6 @@ UI::View::View *ActionContext::getView() const
SPDesktop *ActionContext::getDesktop() const
{
- // TODO: this slightly horrible storage of a UI::View::View*, and
- // casting to an SPDesktop*, is only done because that's what was
- // already the norm in the Inkscape codebase. This seems wrong. Surely
- // we should store an SPDesktop* in the first place? Is there a case
- // of actions being carried out on a View that is not an SPDesktop?
return static_cast<SPDesktop *>(_view);
}
diff --git a/src/helper/action-context.h b/src/helper/action-context.h
index 2660bc59c..d3468ea3e 100644
--- a/src/helper/action-context.h
+++ b/src/helper/action-context.h
@@ -37,7 +37,7 @@ class View;
used to take as parameters in their methods. Why is this? They almost
always seemed to cast straight to an SPDesktop* - so shouldn't we actually
be storing an SPDesktop*? Is there a case where a non-SPDesktop
- UI::View::View is used by the actions?
+ UI::View::View is used by the actions? YES: Command-line wihtout GUI.
ActionContext is designed to be copyable, so it may be used with stack
storage if required. */