mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
fix DownloadDialog behavior
The DownloadDialog behavior was broken in a way it allows the user to make changes on the dialog while the download is happening. Also, clicking on "Cancel" breaks/hangs the UI sometimes, as libdivingcomputer doesn't always cancels the download right away. That's a bug that still needs to be fixed. Signed-off-by: Danilo Cesar Lemes de Paula <danilo.eu@gmail.com>
This commit is contained in:
parent
db44045cfe
commit
ab649e21ba
2 changed files with 49 additions and 2 deletions
|
|
@ -24,7 +24,7 @@ private:
|
|||
class InterfaceThread : public QThread{
|
||||
Q_OBJECT
|
||||
public:
|
||||
InterfaceThread(QObject *parent, device_data_t *data) ;
|
||||
InterfaceThread(QObject *parent, device_data_t *data);
|
||||
virtual void run();
|
||||
|
||||
signals:
|
||||
|
|
@ -39,13 +39,19 @@ class DownloadFromDCWidget : public QDialog{
|
|||
public:
|
||||
explicit DownloadFromDCWidget(QWidget* parent = 0, Qt::WindowFlags f = 0);
|
||||
static DownloadFromDCWidget *instance();
|
||||
void reject();
|
||||
|
||||
public slots:
|
||||
void on_ok_clicked();
|
||||
void on_cancel_clicked();
|
||||
void runDialog();
|
||||
void stoppedDownloading();
|
||||
void on_vendor_currentIndexChanged(const QString& vendor);
|
||||
|
||||
private:
|
||||
void markChildrenAsDisabled();
|
||||
void markChildrenAsEnabled();
|
||||
|
||||
Ui::DownloadFromDiveComputer *ui;
|
||||
InterfaceThread *thread;
|
||||
bool downloading;
|
||||
|
|
@ -58,6 +64,7 @@ private:
|
|||
QStringListModel *vendorModel;
|
||||
QStringListModel *productModel;
|
||||
void fill_computer_list();
|
||||
|
||||
public:
|
||||
bool preferDownloaded();
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue