From 729b8af35cbee50fbe851956533aafa54b2ed9d0 Mon Sep 17 00:00:00 2001 From: Ole Christian Eidheim Date: Thu, 27 Aug 2015 13:09:49 +0200 Subject: [PATCH] Fixed: assertion 'buffer->priv->user_action_count > 0' failed --- src/selectiondialog.cc | 4 +++- src/selectiondialog.h | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/selectiondialog.cc b/src/selectiondialog.cc index 9965b98..8b73072 100644 --- a/src/selectiondialog.cc +++ b/src/selectiondialog.cc @@ -64,6 +64,7 @@ void SelectionDialogBase::add_row(const std::string& row, const std::string& too } void SelectionDialogBase::show() { + shown=true; move(); window->show_all(); } @@ -72,8 +73,9 @@ void SelectionDialogBase::hide() { window->hide(); if(tooltips) tooltips->hide(); - if(on_hide) + if(on_hide && shown) on_hide(); + shown=false; } void SelectionDialogBase::update_tooltips() { diff --git a/src/selectiondialog.h b/src/selectiondialog.h index abdd59b..e454a3c 100644 --- a/src/selectiondialog.h +++ b/src/selectiondialog.h @@ -31,6 +31,8 @@ protected: std::unique_ptr tooltips; std::unordered_map tooltip_texts; std::string last_row; +private: + bool shown=false; }; class SelectionDialog : public SelectionDialogBase {