mirror of
https://github.com/transmission/transmission
synced 2025-03-12 07:03:44 +00:00
Fixing bug in when closing new torrent options dialog (#7247)
This commit is contained in:
parent
2ba8cccfa7
commit
dc6c761c29
1 changed files with 7 additions and 5 deletions
|
@ -73,7 +73,7 @@ public:
|
|||
Glib::RefPtr<Gtk::Builder> const& builder,
|
||||
Glib::RefPtr<Session> const& core,
|
||||
std::unique_ptr<tr_ctor, void (*)(tr_ctor*)> ctor);
|
||||
~Impl() = default;
|
||||
~Impl();
|
||||
|
||||
TR_DISABLE_COPY_MOVE(Impl)
|
||||
|
||||
|
@ -102,6 +102,11 @@ private:
|
|||
FreeSpaceLabel* freespace_label_ = nullptr;
|
||||
};
|
||||
|
||||
OptionsDialog::Impl::~Impl()
|
||||
{
|
||||
removeOldTorrent();
|
||||
}
|
||||
|
||||
void OptionsDialog::Impl::removeOldTorrent()
|
||||
{
|
||||
if (tor_ != nullptr)
|
||||
|
@ -133,10 +138,7 @@ void OptionsDialog::Impl::addResponseCB(int response)
|
|||
}
|
||||
|
||||
gtr_save_recent_dir("download", core_, downloadDir_);
|
||||
}
|
||||
else if (response == TR_GTK_RESPONSE_TYPE(CANCEL))
|
||||
{
|
||||
removeOldTorrent();
|
||||
tor_ = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue