diff options
| author | Nick Dedekind <nicholas.dedekind@gmail.com> | 2012-10-03 13:01:16 -0400 | 
|---|---|---|
| committer | Tarmac <> | 2012-10-03 13:01:16 -0400 | 
| commit | 8ef10a4dd2ccba02a71eab3c9f9b70348691253a (patch) | |
| tree | 9db5334f6097d37ad364a9c035be486da0d15fa7 | |
| parent | 892a1086986008145e2bcc902d43743e3007f23b (diff) | |
| parent | ac2c7829e0de5f3a3ee2cb16b7c1c08c4bd80190 (diff) | |
Fixed preview pre-activate creating preview window on direct activation. (LP: #1060827). Fixes: https://bugs.launchpad.net/bugs/1060827. Approved by Michal Hruby, David Callé.
(bzr r2789)
| -rw-r--r-- | dash/DashView.cpp | 2 | ||||
| -rw-r--r-- | dash/PreviewStateMachine.cpp | 5 | 
2 files changed, 5 insertions, 2 deletions
| diff --git a/dash/DashView.cpp b/dash/DashView.cpp index 1b74baa64..5cec24aee 100644 --- a/dash/DashView.cpp +++ b/dash/DashView.cpp @@ -223,7 +223,7 @@ void DashView::OnUriActivated(ResultView::ActivateType type, std::string const&  }  // we want immediate preview reaction on first opening. - if (type == ResultView::ActivateType::DIRECT && !preview_displaying_) + if (type == ResultView::ActivateType::PREVIEW && !preview_displaying_)  {  BuildPreview(Preview::Ptr(nullptr));  } diff --git a/dash/PreviewStateMachine.cpp b/dash/PreviewStateMachine.cpp index d77fb1d33..1d667820e 100644 --- a/dash/PreviewStateMachine.cpp +++ b/dash/PreviewStateMachine.cpp @@ -50,8 +50,8 @@ PreviewStateMachine::~PreviewStateMachine()  void PreviewStateMachine::ActivatePreview(Preview::Ptr preview)  {  stored_preview_ = preview; - CheckPreviewRequirementsFulfilled();  requires_activation_ = true; + CheckPreviewRequirementsFulfilled();  }  void PreviewStateMachine::Reset() @@ -85,7 +85,10 @@ void PreviewStateMachine::CheckPreviewRequirementsFulfilled()  return;  if (stored_preview_ == nullptr) + { + requires_activation_ = true;  return; + }  /* right now this is disabled as long as we aren't doing the fancy splitting animation  * as we don't care about positions | 
